$row = $tmp[1]; $tem = $tmp[0]; /** * Obdelava feedback */ $sql = "SELECT * FROM `feedback` WHERE `modified_by`={$person_id} and `status` in (0, 1) order by id desc"; $result = $db->fetchAll($sql); foreach ($result as $res) { $table .= $row; $table = str_replace("##FEEDBTIME##", $res[timestamp], $table); $table = str_replace("##FEEDBNOTE##", substr($res["note"], 0, 120) . '...', $table); } /** *Izpis končanih v feedback */ $tmp = template_get_repeat_text("##START END##", "##STOP_END##", "##LOGS2##", $tem); $row = $tmp[1]; $tem = $tmp[0]; unset($result); $sql = "SELECT * FROM `feedback` WHERE `modified_by`={$person_id} and `status` =2 order by id desc LIMIT 0 , 4"; $result = $db->fetchAll($sql); foreach ($result as $res) { $table2 .= $row; $table2 = str_replace("##FEEDBTIME DONE##", $res[timestamp], $table2); $table2 = str_replace("##FEEDBNOTE DONE##", substr($res["note"], 0, 120) . '...', $table2); } $sql = " SELECT person_id, jobtype_id, count(log_id) as sest FROM `log` WHERE person_id={$person_id} and jobtype_id in (1, 12, 22, 16) group by person_id, jobtype_id"; $result = $db->fetchAll($sql); if (is_array($result)) { foreach ($result as $res) { switch ($res[jobtype_id]) {
<?php require_once "inc/config.php"; check_role($ROLE_USER); $tem = template_open("help.tpl"); $tem = template_add_head_foot($tem, head, foot); $tmp = template_get_repeat_text("##START_LOG##", "##STOP_LOG##", "##LOGS##", $tem); $row = $tmp[1]; $tem = $tmp[0]; $sql = 'SELECT `applic`.`name` aname,`work`.`name` wname,`work`.`opis` wopis FROM work,applic where `work`.`applic_id`=`applic`.`applic_id` and `work`.`group`<=86 order by `applic`.`name` '; $result = $db->fetchAll($sql); //log_id timestamp person_id jobtype_id start end note job_id name description foreach ($result as $res) { $table .= $row; $table = str_replace("##APP_NAME##", $res["aname"], $table); $table = str_replace("##NAME_WORK##", $res["wname"], $table); $table = str_replace("##DESC_WORK##", $res["wopis"], $table); //echo "<br>".$res['timestamp']." - ".date("H:i",$res['start'])." - ".date("H:i",$res['stop'])." - ".$res['name']." - ".$res['description']; } $tem = str_replace("##MONTH##", " " . $mon . "/" . $year, $tem); //v header sem dal zraven naslova izpis meseca za katerega je izpis $tem = str_replace('##TITLE##', $TITLE, $tem); $tem = str_replace('##USER##', $identity, $tem); $tem = str_replace("##LOGS##", $table, $tem); $tem = str_replace("##MESSAGE##", $message, $tem); $tem = template_clean_up_tags($tem, "##"); echo $tem;
$event_id = $_REQUEST["event_id"]; $tekma_id = $_REQUEST["tekma"]; if (!$event_id or !$tekma_id) die("event tekma .. nic ni"); //create db object// $db = new DB_Sql(); //open template// $tem = template_open("run.tpl"); //add header footer// $tem = template_add_head_foot($tem,head,foot); $tmp = template_get_repeat_text("##START##","##STOP##","##RUNNERS##",$tem); $row = $tmp[1]; $tem = $tmp[0]; //get out the event title// $sql = "Select events.name as ename, tekma.name as tname from events,tekma where event_id='$event_id' and tekma_id='$tekma_id'"; $db->query($sql); if ($db->next_record()) { $tem = str_replace("##TITLE##",$db->f("ename"). " - ". $db->f("tname"),$tem); } ///now the runners// $sql = "SELECT * FROM `timming` , users WHERE `timming`.event_id = $event_id AND tekma_id = $tekma_id
<? include "../inc/config.php"; //create db object// $db = new DB_Sql(); //open template// $tem = template_open("print_user.tpl"); //add header footer// ///$tem = template_add_head_foot($tem,head,foot); $tmp = template_get_repeat_text("##START##","##STOP##","##USER_LIST##",$tem); $row = $tmp[1]; $tem = $tmp[0]; //get out the events// $sql = "SELECT * FROM users, events WHERE users.event_id=events.event_id and id_user=$id_user ORDER BY events.event_id, users.number ASC"; $db->query($sql); while ($db->next_record()) { $table.=$row; $table = str_replace("##USER_ID##",$db->f("id_user"),$table); $table = str_replace("##NAME##",$db->f("full_name"),$table); $table = str_replace("##EVENT##",$db->f("name"),$table); $table = str_replace("##NUMBER##",$db->f("number"),$table); } //replace template variables// $tem = str_replace("##USER_LIST##",$table,$tem); $tem = str_replace("##MESSAGE##",$message,$tem); ///clean up//
//create db object// $db = new DB_Sql(); //open template// $tem = template_open("user_group_list.tpl"); //add header footer// $tem = template_add_head_foot($tem,head,foot); $tmp = template_get_repeat_text("##START_EN##","##STOP_EN##","##RESULTS##",$tem); $row = $tmp[1]; $tem = $tmp[0]; $tmp = template_get_repeat_text("##START_ALL##","##STOP_ALL##","##RESULTS_LIST##",$tem); $row_category = $tmp[1]; $tem = $tmp[0]; //echo $row_category . "<hr>". $row; $tekma = $_REQUEST["tekma"]; $event_id = $_REQUEST["event_id"];