$xtemplate = $path . "templates/career/outstanding_assignments_plan.html"; $file = $common->return_file_content($db_object, $xtemplate); $pattern = "/<{row_loopstart}>(.*?)<{row_loopend}>/s"; preg_match($pattern, $file, $match); $match = $match[0]; for ($i = 0; $i < count($result); $i++) { $userid = $result[$i][assigned_to]; $username = $common->name_display($db_object, $userid); $date = $result[$i][date]; $position_name = $result[$i][position_name]; $sql = "select email from {$user_table} where user_id='{$userid}'"; $res = $db_object->get_a_line($sql); $email = $res[email]; $pos_id = $result[$i][position_id]; $status = $result[$i][status]; if ($status != "y") { $highlight = "class=TR"; } else { $highlight = ""; } $str .= preg_replace("/<{(.*?)}>/e", "\$\$1", $match); } $file = preg_replace($pattern, $str, $file); $file = $common->direct_replace($db_object, $file, $xArray); echo $file; } } } $obj = new assignments(); $obj->outstanding_assignments($db_object, $common, $user_id, $error_msg, $gbl_date_format); include_once 'footer.php';
if (count($users) > 1) { $users_id = @implode(",", $users); $users_id = "(" . $users_id . ")"; } else { $users_id = "(" . $users[0] . ")"; } $qry = "select {$user_table}.user_id,{$user_table}.username,date_format({$position}.date_added,'%m.%d.%Y.%i:%s'),\n\t\t\n\t\t{$position}.position_name,{$user_table}.email from {$user_table},{$position} where \n\t\t\n\t\t{$user_table}.position={$position}.pos_id and {$user_table}.user_id in {$users_id} order by \n\t\t\n\t\t{$position}.date_added asc"; $res = $db_object->get_rsltset($qry); $path = $common->path; $xtemplate = $path . "templates/career/outstanding_assignments.html"; $file = $common->return_file_content($db_object, $xtemplate); $pattern = "/<{user_loopstart}>(.*?)<{user_loopend}>/s"; preg_match($pattern, $file, $match); $match = $match[0]; for ($a = 0; $a < count($res); $a++) { $user = $res[$a][user_id]; $name = $common->name_display($db_object, $user); $date = $res[$a][2]; $pos = $res[$a][position_name]; $email = $res[$a][email]; $str .= preg_replace("/<{(.*?)}>/e", "\$\$1", $match); } $file = preg_replace($pattern, $str, $file); $file = $common->direct_replace($db_object, $file, $values); echo $file; } } } $obj = new assignments(); $obj->outstanding_assignments($db_object, $common, $user_id); include_once "footer.php";