public function __construct($user) { $this->id = $user['id']; $this->dep_id = $user['dep_id']; $this->position_id = $user['position_id']; $this->email = $user['email']; $this->password = $user['password']; $this->avatar = $user['avatar']; $this->firstname = $user['firstname']; $this->lastname = $user['lastname']; $this->location = $user['location']; $this->about = $user['about']; $this->active = $user['active']; $this->dep = get_dep($this->dep_id); /* dep_id ни объект кылып берип жатабыз */ $this->position = get_position($this->position_id); /* position_id ни объект кылып берип жатабыз */ }
admin_log($position_name, 'edit', 'ads_position'); make_json_result(stripslashes($position_name)); } else { make_json_error($db->error()); } } } elseif ($_REQUEST['act'] == 'remove') { check_authz_json('ad_manage'); $id = intval($_GET['id']); $exc->drop($id); admin_log('', 'remove', 'ads_position'); $url = 'new_position.php?act=query&' . str_replace('act=remove', '', $_SERVER['QUERY_STRING']); ecs_header("Location: {$url}\n"); exit; } elseif ($_REQUEST['act'] == 'query') { $position_list = get_position(); $smarty->assign('position_list', $position_list['ads']); $smarty->assign('filter', $position_list['filter']); $smarty->assign('record_count', $position_list['record_count']); $smarty->assign('page_count', $position_list['page_count']); $sort_flag = sort_flag($position_list['filter']); $smarty->assign($sort_flag['tag'], $sort_flag['img']); make_json_result($smarty->fetch('new_position.htm'), '', array('filter' => $position_list['filter'], 'page_count' => $position_list['page_count'])); } /* 获取广告数据列表 */ function get_position() { /* 过滤查询 */ $position_name = !empty($_REQUEST['position_name']) ? trim($_REQUEST['position_name']) : ''; $filter = array(); $filter['position_name'] = $position_name;
<?php include_once '../config/config.php'; /* конфигурация файлын кошобуз, баардык конфигурацияларыбыз ушул жерде болот */ include_once PROJECT_PATH . '/partials/header.php'; /* проекттин баш жагын кошот */ $position = get_position($_GET['position']); ?> <div class="container"> <?php include_once PROJECT_PATH . "/partials/menu.php"; ?> <div class="row"> <div class="col-sm-4"> <div class="card hovercard"> <div class="cardheader"> </div> <div class="info"> <div class="title"> <span class="text-primary"><?php echo $position->getFullname(); ?> </span> </div> </div> <div class="bottom"> <!--
function capture() { if (date("H") > 18 && date("H") < 00) { //is between 6pm and 8am dont capture images return; } echo 'starting</br>'; $imgdata = get_image(); if ($imgdata) { $saved = save_image($imgdata); if ($saved) { echo 'saved </br>'; } } else { echo 'image not saved </br>'; } $cameraposition = get_position(); echo $cameraposition; next_position($cameraposition); move_cam($cameraposition); }
/** * 获得当前位置 * * @access public * @param 无 * @return string */ function position() { //global $ct,$lang,$cateid,$language; global $channel_info, $cate_list, $cate_info; $_confing = get_confing($GLOBALS['lang']); if ($cate_info['cate_channel'] == '-9') { $list_php = "order/order.php"; } else { $list_php = empty($channel_info['list_php']) ? 'show_list.php' : $channel_info['list_php']; $content_php = empty($channel_info['content_php']) ? 'show_content.php' : $channel_info['content_php']; } $cat_id = intval($GLOBALS['cat_id']); if (get_index_url($GLOBALS['lang'])) { $index_str = CMS_SELF; } else { $index_str = $_confing['web_html'][0] ? CMS_SELF . 'index_' . $GLOBALS['lang'] . '.html' : CMS_SELF . 'index.php?lang=' . $GLOBALS['lang']; } if (!empty($cat_id)) { $path = CMS_SELF; if (file_exists(DATA_PATH . 'cache_cate/cate_list_' . $GLOBALS['lang'] . '.php')) { include DATA_PATH . 'cache_cate/cate_list_' . $GLOBALS['lang'] . '.php'; } //取得父栏目 if (!empty($cate_list)) { foreach ($cate_list as $k => $v) { if ($v['id'] == $cat_id) { $parent = $v['cate_parent']; $is_dy = $v['cate_channel'] == 1 ? 'htm/' . $v['cate_fold_name'] . '/' : 'htm/' . $v['cate_fold_name']; //单页重新设置 $url = $v['cate_html'] && $_confing['web_html'][0] ? CMS_SELF . $is_dy : CMS_SELF . $list_php . "?id={$v['id']}"; $ps = "<a href=\"{$url}\">{$v['cate_name']}</a>"; break; } } echo "<a href=\"" . $index_str . "\">" . $GLOBALS['language']['index'] . "</a> > "; if ($cate_info['cate_channel'] > '1') { get_position($parent, $cate_list, $path, $list_php); } echo $ps; } } else { echo "<a href=\"" . $index_str . "\">" . $GLOBALS['language']['index'] . "</a> > "; } }
function get_position($parent, $cate, $path, $list_php = '') { global $_confing; $str = ''; foreach ($cate as $k => $v) { if ($v['id'] == $parent) { $cate_path = $v['cate_html'] && $_confing['web_html'][0] ? $path . 'htm/' . $v['cate_fold_name'] : $path . $list_php . '?id=' . $v['id']; $str = "<a href=\"{$cate_path}\">{$v['cate_name']}</a> > "; get_position($v['cate_parent'], $cate, $path, $list_php); break; } } echo $str; }
//Bổ sung thêm nhân viên if (checkEP($_SESSION['is_valid'], $i['PId']) == 3 or $dep_auth['Authority'] >= 4) { echo "Thêm nhân viên: "; echo "<form action='index.php' method='post'>"; echo '<input type="hidden" name="action" value="AddEmpPro">'; echo "<input type='hidden' name='PId' value=" . $i['PId'] . ">"; echo "<select name='EId'>"; foreach ($get_nv as $idnv) { echo "<option value=" . $idnv['EId'] . '>'; echo get_full($idnv['EId'])['Name']; echo "</option>"; } echo "</select>"; // ------------ echo "<select name='Position'>"; $get_pos = get_position(1, 3); foreach ($get_pos as $idnv) { echo "<option value=" . $idnv['Id'] . '>'; echo $idnv['Position']; echo "</option>"; } echo "</select>"; echo '<input type="text" id="general-text" name="SpH" placeholder="Tiền công/ngày" >'; /////////////////// echo '<input class="btn btn-primary span1" type="submit" name="Submit" value="Thêm" id="Update">'; echo "</form>"; } echo "</div>"; if ($dep_auth['DId'] == $i['DId'] && $dep_auth['Authority'] >= 2 || $dep_auth['Authority'] >= 4) { echo "<form action='index.php' id='inputform' method='post' class='form-horizontal' >"; echo '<input type="hidden" name="action" value="delete_project">';