preg_match("/<{app_loopstart}>(.*?)<{app_loopend}>/s", $file, $match); $match = $match[0]; for ($i = 0; $i < count($sql_result); $i++) { $approved_on = $sql_result[$i][approved_on]; $approved = @explode(" ", $approved_on); $app1 = @explode("-", $approved[0]); $date1[0] = @implode(".", $app1); $app2 = @explode(":", $approved[1]); $date1[1] = $app2[0] . ":" . $app2[1]; $date = @implode(".", $date1); $name = $sql_result[$i][username]; $str .= preg_replace("/<{(.*?)}>/e", "\$\$1", $match); } $file = preg_replace("/<{app_loopstart}>(.*?)<{app_loopend}>/s", $str, $file); $file = $common->direct_replace($db_object, $file, $xArray); echo $file; } } $obj = new alert_appraisal(); switch ($action) { case NULL: $obj->alert_approved_appraisal($db_object, $common, $user_id); break; case "show": $obj->show_approved_appraisal($db_object, $common, $user_id, $date, $default); break; case "boss": $obj->show_employees_appraisal($db_object, $common, $user_id); break; } include_once "footer.php";
$expectation = @sprintf("%01.2f", $expected); $expect[$i] = $expectation; $fulfilled = @sprintf("%01.2f", $fulfilled); $fulfill[$i] = $fulfilled; $committed = $get['Ccommit']; $committ[$i] = $committed; $accomplish = $get['Caccomplish']; $accomplished[$i] = $accomplish; $boss_name = $common->name_display($db_object, $boss_id); $perqry1 = "select user_id from {$performance_feedback} where request_from='{$user_id}' and \n\t\t\t\tstatus='A' and latest='N' and sl_id='{$sl_id}' and user_id<>'{$user_id}' and user_id<>'{$bossid}'"; $perres1[$i] = $db_object->get_single_column($perqry1); $str = ""; } //end of outer for } //end of if $ret_arr = array($points, $object, $obj_id, $prior, $act, $expect, $fulfill, $committ, $accomplished, $countselres, $perres1); return $ret_arr; } } $obj = new alert_appraisal(); switch ($action) { case NULL: $obj->alert_approved_appraisal($db_object, $common, $fUser_app, $error_msg); break; case "show": $user_id = $fUser_id; $obj->show_approved_appraisal($db_object, $common, $user_id, $date, $default); break; } include_once "footer.php";