$val) { $awarded_user[] = $_POST['selected_user'][$key]; $bid_details[] = $proj->Bid_dteails_Of_User($_POST['project_id'],md5($awarded_user[$key])); } $bid->Award_Project_Winner($_POST['project_id'],$awarded_user); print_r($bid_details);die;*/ //check account $ret = $proj->GetProject($_POST['project_id']); $awarded_user = $_POST['selected_user'][0]; $bid_details = $proj->Bid_dteails_Of_User($_POST['project_id'],md5($awarded_user)); $bid->Award_Project_Winner($_POST['project_id'],$awarded_user); $ret = $user->getUserDetails(md5($awarded_user)); $send_to = $ret->mem_email; global $mail2; $mail2 = ''; $mail2 = new htmlMimeMail(); $tpl2 = new Smarty; $tpl2->compile_dir = $physical_path['Site_Root']. 'templates_c/'; $sendinfo = $emails->GetEmailDetails1(BID_WON); $mail2->setSubject($sendinfo->email_subject); $mail2->setFrom($sendinfo->email_adress); $ret = $proj->GetProject($_POST['project_id']); $tpl2->assign(array( "project_name" => $ret->project_title, "project_link" => "project_title).".html >".$ret->project_title."", "link" => "project_title).".html >Here", "navigation" => '', )); $mail_content_header = $tpl2->fetch("email_template:".EMAIL_HEADER); $mail_content_footer = $tpl2->fetch("email_template:".EMAIL_FOOTER); $mail_content_reg = $tpl2->fetch("email_template:".BID_WON); $mail_html = "
".$mail_content_header."
".$mail_content_reg."
".$mail_content_footer."
"; $mail2->setHtml($mail_html); $result = $mail2->send(array($send_to)); header("location: award_project.php?send_mail=true&id=".$_POST['project_id']); exit(); } if($_GET['send_mail'] == true) { $tpl->assign(array( "T_Body" => 'award_projects_send'. $config['tplEx'], )); } else { $error = 0; $ret = $proj->GetProject($_GET['id']); if($_SESSION['User_Id'] == $ret->auth_id_of_post_by) { $bid->Get_Award_List_Project($_GET['id']); $cnt = $db1->num_rows(); $i = 0; while($db1->next_record()) { $arr_bids[$i]['bid_by_user'] = $db1->f('bid_by_user'); $arr_bids[$i]['bid_amount'] = $db1->f('bid_amount'); $arr_bids[$i]['delivery_within'] = $db1->f('delivery_within'); $arr_bids[$i]['date_2'] = $db1->f('date_2'); $arr_bids[$i]['reviews'] = $seller->Average_Seller_Rating_Count($db1->f('bid_by_user')); $arr_bids[$i]['rating'] = number_format($seller->Average_Seller_Rating($db1->f('bid_by_user')),2); $i++; } } else { $error = 1; } $str = $_SERVER['HTTP_REFERER']; $str1 = substr(strrchr($str,'/'),1); if($str1 == 'project_'.$_GET['id'].'_'.$_GET['proj_name'].'.html') { $navigation = ''.stripslashes($ret->project_title).''; $navigation1= ''; } $tpl->assign(array( "T_Body" => 'award_projects'. $config['tplEx'], "JavaScript" => array("award.js"), "arr_bids" => $arr_bids, "Loop" => $cnt, "error" => $error, "navigation" => $navigation, "navigation1" => $navigation1, "navigation2" => $navigation2, )); } // Bug q produce pantalla en blanco sin informacion alguna /*if(($ret->project_status) == 2 && ($_SESSION['User_Id'] == $ret->auth_id_of_post_by)) { $str = $_SERVER['HTTP_REFERER']; $str1 = substr(strrchr($str,'/'),1); if($str1 == 'project_'.$_GET['id'].'_'.$_GET['proj_name'].'.html') { $navigation = ''.stripslashes($ret->project_title).''; $navigation1= ''; } $tpl->assign(array( "T_Body" => 'Msg1'. $config['tplEx'], "msg" => $lang['Award_Again'], "user" => $ret->project_post_to, "msg1" => $lang['Award_Again1'], "navigation" => $navigation, "navigation1" => $navigation1, "navigation2" => $navigation2, )); }*/ $ret = $proj->GetProject($_GET['id']); $str = $_SERVER['HTTP_REFERER']; $str1 = substr(strrchr($str,'/'),1); if($str1 == 'project_'.$_GET['id'].'_'.$_GET['proj_name'].'.html') { $navigation = ''.stripslashes($ret->project_title).''; $navigation1= ''; } $tpl->assign(array( "lang" => $lang, "project_name" => stripslashes($ret->project_title), "project_id" => $ret->project_id, "navigation" => ''.$lang['Buyer_Activity'].'', "navigation1" => 'project_id.'.html class=footerlink>'.$lang['Pick_a_Software_Coder'].'', "tab" => 4, "navigation" => $navigation, "navigation1" => $navigation1, "navigation2" => $navigation2, )); $tpl->display('default_layout'. $config['tplEx']); ?>