$href1 = ""; if ($fGraphchange == 1) { $xArray['img'] = "graph_emp.php"; $xArray['img1'] = "graph_emp1.php"; if ($link_fl == 0) { $xArray['href'] = "<a href='learning_progress_summary.php'>"; } if ($link_fl == 0) { $xArray['href1'] = "<a href='learning_progress_summary.php'>"; } } else { if ($fGraphchange == 2) { $xArray['img'] = "graph_boss.php"; $xArray['img1'] = "graph_boss1.php"; } else { if ($fGraphchange == 3) { $xArray['img'] = "graph_admin.php"; $xArray['img1'] = "graph_admin1.php"; $xArray['href'] = "<a href ='raters_list.php'>"; $xArray['href1'] = "<a href = 'users_list.php'>"; } } } $filecontent = preg_replace("/<{(.*?)}>/s", "", $filecontent); $filecontent = $common->direct_replace($db_object, $filecontent, $xArray); echo $filecontent; } } $frobj = new front(); $frobj->front_display($common, $db_object, $post_var, $user_id, $learning, $gbl_gr_select); include "footer.php";
} else { preg_match("/<{only_for_admins_area}>(.*?)<{only_for_admins_area}>/s", $filecontent, $mat); $replace = $mat[0]; if ($user_id != 1) { $selqry = "select username,user_id from {$user_table} where admin_id='{$user_id}'"; } else { $selqry = "select {$user_table}.username,{$user_table}.user_id from {$user_table},{$position_table} where {$user_table}.position={$position_table}.pos_id and ({$user_table}.position<>NULL or {$user_table}.position<>0) and {$user_table}.user_id!=1 order by {$position_table}.level_no desc"; } $userset = $db_object->get_rsltset($selqry); if ($userset[0]["user_id"] != "") { for ($i = 0; $i < count($userset); $i++) { $temp_id = $userset[$i]["user_id"]; $userset[$i]["username"] = $common->name_display($db_object, $temp_id); } $userset = $common->return_Keyedarray($userset, "user_id", "username"); $replaced = $common->singleloop_replace($db_object, "user_loopstart", "user_loopend", $replace, $userset, $selqrr); } else { $replaced = preg_replace("/<{view_dashboard}>(.*)<{view_dashboard}>/s", "", $replace); } $replace = preg_replace("/<{(.*?)}>/s", "", $replaced); $filecontent = preg_replace("/<{only_for_admins_area}>(.*?)<{only_for_admins_area}>/s", $replace, $filecontent); // $filecontent=preg_replace("/<{(.*?)}>/s","",$filecontent); } //-if the user is super admin then the alert of skill builderpages should not be shown $filecontent = $common->direct_replace($db_object, $filecontent, $value); echo $filecontent; } } $frobj = new front(); $frobj->front_display($common, $db_object, $image, $user_id, $gbl_gr_select, $fAs, $fModel); include "footer.php";
<?php include "../session.php"; include "header.php"; class front { function front_display($common, $db_object, $user_id) { $path = $common->path; $filename = $path . "templates/core/front_panel.html"; $filecontent = $common->return_file_content($db_object, $filename, $user_id); $vals = array(); $filecontent = $common->direct_replace($db_object, $filecontent, $vals); echo $filecontent; } } $frobj = new front(); $frobj->front_display($common, $db_object, $user_id); include "footer.php";