/** * Fucntion to display more videos page title * * @param unknown $type_name * @param unknown $typename * @return string */ function morePageTitle($type_name, $typename) { $div = ''; /** Check type name and get title for the more pages */ switch ($type_name) { case 'Category': /** Get playlsit name based on playl id */ $playlist_name = get_playlist_name(intval(absint($this->_playid))); /** Display playlist title in category page*/ $div .= '<h2 class="titleouter" >' . $playlist_name . ' </h2>'; break; case 'User': /** Get user name based on user id */ $user_name = get_user_name(intval($this->_userid)); /** Display user name in user videos page */ $div .= '<h2 >' . $user_name . ' </h2>'; break; case 'popular': case 'recent': case 'random': case 'featured': /** Get current more type and display as page title */ $div .= '<h2 >' . $typename . ' ' . __('Videos', APPTHA_VGALLERY) . ' </h2>'; break; default: break; } /** Return more page title */ return $div; }
function update_logo() { global $cfg; if (isset($_POST['uaction']) && $_POST['uaction'] === 'upload_logo') { $file_type = $_FILES['logo_file']['type']; if (empty($_FILES['logo_file']['name'])) { set_page_message(tr('Upload file error!')); return; } if (!($file_type === "image/gif" || $file_type === "image/jpeg" || $file_type === "image/pjpeg")) { set_page_message(tr('You can upload only images!')); return; } else { $fname = $_FILES['logo_file']['name']; $fsize = $_FILES['logo_file']['size']; $user_id = $_SESSION['user_id']; $path1 = substr($_SERVER['SCRIPT_FILENAME'], 0, strpos($_SERVER['SCRIPT_FILENAME'], '/admin/layout.php') + 1); $path2 = substr($cfg['ROOT_TEMPLATE_PATH'], 0, strpos($cfg['ROOT_TEMPLATE_PATH'], '/tpl') + 1); // move_uploaded_file($_FILES['logo_file']['tmp_name'], $path1 . "/themes/user_logos/" . get_user_name($user_id) . ".jpg"); update_user_gui_props(get_user_name($user_id) . ".jpg", $user_id); set_page_message(tr('Your logo was successful uploaded!')); } } }
protected function _update() { $id = $_POST["id"]; $model = M("MailOrganize"); $model->where("id={$id}")->delete(); $model = D("MailOrganize"); if (false === $model->create()) { $this->error($model->getError()); } if (in_array('user_id', $model->getDbFields())) { $model->user_id = get_user_id(); } if (in_array('user_name', $model->getDbFields())) { $model->user_name = get_user_name(); } //保存当前数据对象 $list = $model->add(); if ($list !== false) { //保存成功 $this->assign('jumpUrl', get_return_url()); $this->success('编辑成功!'); } else { //失败提示 $this->error('编辑失败!'); } }
public function view_order() { $id = intval($_REQUEST['id']); $list = M("GoodsOrder")->where("id =" . $id)->find(); if ($list['is_delivery'] == 0) { $list['is_delivery_format'] = "否"; } else { $list['is_delivery_format'] = "是"; } if ($list['order_status'] == 0) { $list['order_status_format'] = "未发货"; } elseif ($list['order_status'] == 1) { $list['order_status_format'] = "已发货"; } elseif ($list['order_status'] == 2) { $list['order_status_format'] = "无效订单"; } elseif ($list['order_status'] == 3) { $list['order_status_format'] = "用户删除"; } $list['ex_time'] = to_date($list['ex_time'], "Y-m-d H:i:s"); $list['delivery_time'] = to_date($list['delivery_time'], "Y-m-d H:i:s"); $list['user_name'] = get_user_name($list['user_id']); $list['attr_format'] = unserialize($list['attr']); foreach ($list['attr_format'] as $kk => $vv) { $attr_str .= $GLOBALS['db']->getOne("select name from " . DB_PREFIX . "goods_type_attr where id =" . $kk); $attr_str .= ":"; $attr_str .= $GLOBALS['db']->getOne("select name from " . DB_PREFIX . "goods_attr where id =" . $vv); $attr_str .= " "; } $list['attr_str'] = $attr_str; $this->assign('list', $list); $this->display(); }
protected function _insert() { $model = M('MailAccount'); if (false === $model->create()) { $this->error($model->getError()); } if (in_array('id', $model->getDbFields())) { $model->id = get_user_id(); } if (in_array('user_name', $model->getDbFields())) { $model->user_name = get_user_name(); } $email = $_POST['email']; //保存当前数据对象 $list = $model->add(); if ($list !== false) { //保存成功 $this->_set_email($email); $this->assign('jumpUrl', get_return_url()); $this->success('新增成功!'); } else { //失败提示 $this->error('新增失败!'); } }
private function goods_user_go($uid = null, $gid = null, $num = null) { System::load_sys_fun('user'); $good_info = $gid; $gid = $good_info['id']; $uinfo = $uid; $uid = $uinfo['uid']; $gtitle = $good_info['title']; $utitle = get_user_name($uinfo); $paydb = System::load_app_class('pay', 'pay'); $number = $num; $reg = $paydb->pay_user_go_shop($uid, $gid, $number); if ($reg) { $specify = $this->db->GetOne("select * from `@#_goodspecify` where `gid` = '{$gid}' and `uid` = '{$uid}'"); if ($specify) { $number = $specify['num'] + $number; $this->db->Query("UPDATE `@#_goodspecify` SET `num` = '{$number}' where `id` = '{$specify['id']}'"); } else { $inster = $this->db->Query("INSERT INTO `@#_goodspecify` (`uid`,`gid`,`num`,`utitle`,`gtitle`) VALUES ('{$uid}','{$gid}','{$number}','{$utitle}','{$gtitle}')"); if (!$inster) { _message("商品购买成功但准备会员插入失败!"); } } } return $reg; }
function _before_update(&$data, $options) { $old_data = M("Crm")->find($data['id']); $diff = array_diff_assoc($data, $old_data); $diff = array_keys($diff); $desc = array('name' => '姓名', 'mobile_tel' => '手机', 'district' => '小区', 'need' => '客户需求', 'source' => '客户来源', 'age' => '年龄', 'work' => '职业'); if (!empty($diff)) { foreach ($diff as $val) { $model->need = implode(",", $model->need); if (is_array($data[$val])) { $new = implode(",", $data[$val]); } else { $new = $data[$val]; } $comment .= $desc[$val] . ":" . $old_data[$val] . "->" . $new . " ; "; } $model = D("CrmLog"); $log['user_id'] = get_user_id(); $log['user_name'] = get_user_name(); $log['create_time'] = time(); $log['crm_id'] = $data['id']; $log['emp_no'] = get_emp_no(); $log['comment'] = $comment; $model->add($log); } }
function print_login_button() { if (is_logged_in()) { echo '<a href="userprofile.php?userid=' . get_user_id() . '">' . get_user_name() . '</a> | <a href="./twitteroauth/clearsessions.php">Log out</a>'; } else { echo '<a href="./twitteroauth/redirect.php">Sign in with Twitter</a>'; } }
public function lottery_shop_json() { if (!isset($_GET['gid'])) { echo json_encode(array("error" => '1')); return; exit; } $gid = trim($_GET['gid']); $times = (int) System::load_sys_config('system', 'goods_end_time'); if (!$times) { $times = 1; } $db = System::load_sys_class('model'); $gid = safe_replace($gid); $gid = str_ireplace("select", "", $gid); $gid = str_ireplace("union", "", $gid); $gid = str_ireplace("'", "", $gid); $gid = str_ireplace("%27", "", $gid); $gid = trim($gid, ','); if (!$gid) { $info = $db->GetOne("select qishu,xsjx_time,id,zongrenshu,thumb,title,q_uid,q_user,q_user_code,q_end_time from `@#_shoplist` where `q_showtime` = 'Y' order by `q_end_time` ASC"); } else { $infos = $db->GetList("select qishu,xsjx_time,id,zongrenshu,thumb,title,q_uid,q_user,q_user_code,q_end_time from `@#_shoplist` where `q_showtime` = 'Y' order by `q_end_time` ASC limit 0,4"); $gid = @explode('_', $gid); $info = false; foreach ($infos as $infov) { if (!in_array($infov['id'], $gid)) { $info = $infov; break; } } } if (!$info) { echo json_encode(array("error" => '1')); return; exit; } if ($info['xsjx_time']) { $info['q_end_time'] = $info['q_end_time'] + $times; } System::load_sys_fun("user"); $user = unserialize($info['q_user']); $user = get_user_name($info['q_uid'], "username"); $uid = $info['q_uid']; $upload = G_UPLOAD_PATH; $q_time = substr($info['q_end_time'], 0, 10); if ($q_time <= time()) { $db->Query("update `@#_shoplist` SET `q_showtime` = 'N' where `id` = '{$info['id']}' and `q_showtime` = 'Y' and `q_uid` is not null"); echo json_encode(array("error" => '-1')); return; exit; } $user_shop_number = $db->GetOne("select sum(gonumber) as gonumber from `@#_member_go_record` where `uid`= '{$uid}' and `shopid` = '{$info['id']}' and `shopqishu` = '{$info['qishu']}'"); $user_shop_number = $user_shop_number['gonumber']; $times = $q_time - time(); echo json_encode(array("error" => "0", "user_shop_number" => "{$user_shop_number}", "user" => "{$user}", "zongrenshu" => $info['zongrenshu'], "q_user_code" => $info['q_user_code'], "qishu" => $info['qishu'], "upload" => $upload, "thumb" => $info['thumb'], "id" => $info['id'], "uid" => "{$uid}", "title" => $info['title'], "user" => $user, "times" => $times)); exit; }
public function send_shop_code() { if (!isset($_POST['send']) && !isset($_POST['uid']) && !isset($_POST['gid'])) { exit(0); } $uid = abs($_POST['uid']); $gid = abs($_POST['gid']); $db = System::load_sys_class("model"); $sendinfo = $db->GetOne("SELECT id,send_type FROM `@#_send` WHERE `gid` = '{$gid}' and `uid` = '{$uid}'"); if ($sendinfo) { exit(0); } $member = $db->GetOne("SELECT * FROM `@#_member` WHERE `uid` = '{$uid}'"); if (!$member) { exit(0); } $info = $db->GetOne("SELECT id,q_user_code,q_end_time,title,q_user FROM `@#_shoplist` WHERE `id` = '{$gid}' and `q_uid` = '{$uid}'"); if (!$info) { exit(0); } $username = get_user_name($member, 'username', 'all'); $this->send_insert($uid, $gid, $username, $info['title'], '-1'); $type = System::load_sys_config("send", "type"); if (!$type) { exit(0); } $q_time = abs(substr($info['q_end_time'], 0, 10)); while (time() < $q_time) { sleep(5); } $ret_send = false; if ($type == '1') { if (!empty($member['email'])) { send_email_code($member['email'], $username, $uid, $info['q_user_code'], $info['title']); $ret_send = true; } } if ($type == '2') { if (!empty($member['mobile'])) { send_mobile_shop_code($member['mobile'], $uid, $info['q_user_code']); $ret_send = true; } } if ($type == '3') { if (!empty($member['email'])) { send_email_code($member['email'], $username, $uid, $info['q_user_code'], $info['title']); $ret_send = true; } if (!empty($member['mobile'])) { send_mobile_shop_code($member['mobile'], $uid, $info['q_user_code']); $ret_send = true; } } if ($ret_send) { $this->send_insert($uid, $gid, $username, $info['title'], $type); } exit(0); }
function whoami() { if (check_login()) { echo "<p></p>"; echo "Logged in as " . get_user_name(); echo "<a href=\"index.php?logout\" id=\"logout\">logout</a>"; } else { echo "<p></p>"; echo "Not Logged in."; echo "<a href=\"login.php\">login</a>"; } }
function thread_to_xml($thread, $link) { global $state_chatting, $threadstate_to_string, $threadstate_key, $mibew_encoding, $operator, $settings, $can_viewthreads, $can_takeover, $mysqlprefix; $state = $threadstate_to_string[$thread['istate']]; $result = "<thread id=\"" . safe_htmlspecialchars(safe_htmlspecialchars($thread['threadid'])) . "\" stateid=\"{$state}\""; if ($state == "closed") { return $result . "/>"; } $state = getstring($threadstate_key[$thread['istate']]); $nextagent = $thread['nextagent'] != 0 ? operator_by_id_($thread['nextagent'], $link) : null; $threadoperator = $nextagent ? get_operator_name($nextagent) : ($thread['agentName'] ? $thread['agentName'] : "-"); if ($threadoperator == "-" && $thread['groupname']) { $threadoperator = "- " . $thread['groupname'] . " -"; } if (!($thread['istate'] == $state_chatting && $thread['agentId'] != $operator['operatorid'] && !is_capable($can_takeover, $operator))) { $result .= " canopen=\"true\""; } if ($thread['agentId'] != $operator['operatorid'] && $thread['nextagent'] != $operator['operatorid'] && is_capable($can_viewthreads, $operator)) { $result .= " canview=\"true\""; } if ($settings['enableban'] == "1") { $result .= " canban=\"true\""; } $banForThread = $settings['enableban'] == "1" ? ban_for_addr_($thread['remote'], $link) : false; if ($banForThread) { $result .= " ban=\"blocked\" banid=\"" . safe_htmlspecialchars(safe_htmlspecialchars($banForThread['banid'])) . "\""; } $result .= " state=\"{$state}\" typing=\"" . safe_htmlspecialchars(safe_htmlspecialchars($thread['userTyping'])) . "\">"; $result .= "<name>"; if ($banForThread) { $result .= safe_htmlspecialchars(getstring('chat.client.spam.prefix')); } $result .= safe_htmlspecialchars(safe_htmlspecialchars(get_user_name($thread['userName'], $thread['remote'], $thread['userid']))) . "</name>"; $result .= "<addr>" . safe_htmlspecialchars(get_user_addr($thread['remote'])) . "</addr>"; $result .= "<agent>" . safe_htmlspecialchars(safe_htmlspecialchars($threadoperator)) . "</agent>"; $result .= "<time>" . safe_htmlspecialchars(safe_htmlspecialchars($thread['unix_timestamp(dtmcreated)'])) . "000</time>"; $result .= "<modified>" . safe_htmlspecialchars(safe_htmlspecialchars($thread['unix_timestamp(dtmmodified)'])) . "000</modified>"; if ($banForThread) { $result .= "<reason>" . safe_htmlspecialchars(safe_htmlspecialchars($banForThread['comment'])) . "</reason>"; } $userAgent = get_useragent_version($thread['userAgent']); $result .= "<useragent>" . safe_htmlspecialchars($userAgent) . "</useragent>"; if ($thread["shownmessageid"] != 0) { $query = "select tmessage from {$mysqlprefix}chatmessage where messageid = " . intval($thread["shownmessageid"]); $line = select_one_row($query, $link); if ($line) { $message = preg_replace("/[\r\n\t]+/", " ", $line["tmessage"]); $result .= "<message>" . safe_htmlspecialchars(safe_htmlspecialchars($message)) . "</message>"; } } $result .= "</thread>"; return $result; }
/** * Plugin Name: Post Notification * Plugin Description: Sends an Notification email if there's a new post to an favorite topic. (Modified Version 1.4 with Post Content included in E-Mail) * Author: Thomas Klaiber * Author URI: http://thomasklaiber.com/ * Plugin URI: http://thomasklaiber.com/bbpress/post-notification/ * Version: 1.4 */ function notification_new_post($post_id = 0) { global $bbdb, $bb_table_prefix, $topic_id, $bb_current_user; $all_users = notification_select_all_users(); foreach ($all_users as $userdata) { if (notification_is_activated($userdata->ID)) { if (is_user_favorite($userdata->ID, $topic_id)) { //$topic = get_topic($topic_id); $message = __("Hello,\n\nA new post on \"%1\$s\" has been added by %2\$s at DHAnswers. \n\nMessage:\n\n%3\$s \n\n%4\$s "); mail($userdata->user_email, '[DHAnswers] New Post for Favorite Question', sprintf($message, get_topic_title($topic_id), get_user_name($bb_current_user->ID), strip_tags(get_post_text($post_id)), get_topic_link($topic_id)), 'From: ' . bb_get_option('name') . ' <' . bb_get_option('from_email') . '>'); } } } }
function getInfoHtml($uid) { $avatar_width = 100; $avatar_height = 100; $avatar_class = "avatar"; $config = new avatarupload_config(); $avatar_img = ""; if ($a = avatarupload_get_avatar($uid, 1, 1)) { $avatar_img = '<img src="' . $a[0] . '" width="' . $avatar_width . '" height="' . $avatar_height . '" alt="' . $a[4] . '" class="' . $class . '" />'; } $user_name = get_user_name($uid); $profile_link = get_user_profile_link($uid); $html = $avatar_img . '<div class="nombre_usuario"><b><a href="' . $profile_link . '">' . $user_name . '</a></b></div>'; return $html; }
/** * Get the currently logged in user name. * * @return string */ public static function currentUserName() { if (function_exists('\\get_user_name')) { $username = \get_user_name(); } if (empty($username)) { $username = \get_current_user(); } if (empty($username)) { $username = Request::header('php-auth-user'); } if (empty($username)) { $username = '******'; } return $username; }
public function index() { $widget['jquery-ui'] = true; $this->assign("widget", $widget); $uid = get_user_id(); $deptid = get_dept_id(); $username = get_user_name(); // 通用流程 $this->flow = M('flow')->where('type = 98 and (user_id=' . $uid . ' or confirm like "%' . $deptid . '%" or confirm like "%' . $uid . '%")')->select(); //通用任务 $this->task = M('task')->where('type = "lunwen" and (user_id=' . $uid . ' or executor like "%' . $username . '%")')->select(); //申报加分 $this->shenbao = M('flow')->where('type = 46 and user_id=' . $uid)->select(); $config = D("UserConfig")->get_config(); $this->assign("home_sort", $config['home_sort']); $this->display(); }
public function index() { $widget['jquery-ui'] = true; $this->assign("widget", $widget); $uid = get_user_id(); $deptid = get_dept_id(); $username = get_user_name(); // 完成 $where['type'] = array('in', '102,110,111,112,113,114,115,116,117'); $where['step'] = array('egt', '40'); $this->flow = M('flow')->where($where)->order('id desc')->select(); //待办 $where2['type'] = array('in', '102,110,111,112,113,114,115,116,117'); $where2['step'] = array('lt', '40'); $this->todo = M('flow')->where($where2)->order('id desc')->select(); $this->display(); }
public function getUserBuyList() { $member = $this->userinfo; $FIdx = safe_replace($this->segment(4)); $EIdx = 10; //safe_replace($this->segment(5)); $isCount = safe_replace($this->segment(6)); $state = safe_replace($this->segment(7)); if ($state == -1) { //参与云购的商品 全部... $shoplist = $this->db->GetList("select *,sum(gonumber) as gonumber from `@#_member_go_record` a left join `@#_shoplist` b on a.shopid=b.id where a.uid='{$member['uid']}' GROUP BY shopid "); $shoplistall['listItems'] = $this->db->GetList("select *,sum(gonumber) as gonumber from `@#_member_go_record` a left join `@#_shoplist` b on a.shopid=b.id where a.uid='{$member['uid']}' GROUP BY shopid order by a.time desc limit {$FIdx},{$EIdx} "); } elseif ($state == 1) { //参与云购的商品 进行中... $shoplist = $this->db->GetList("select *,sum(gonumber) as gonumber from `@#_member_go_record` a left join `@#_shoplist` b on a.shopid=b.id where a.uid='{$member['uid']}' and b.q_end_time is null GROUP BY shopid "); $shoplistall['listItems'] = $this->db->GetList("select *,sum(gonumber) as gonumber from `@#_member_go_record` a left join `@#_shoplist` b on a.shopid=b.id where a.uid='{$member['uid']}' and b.q_end_time is null GROUP BY shopid order by a.time desc limit {$FIdx},{$EIdx} "); } else { //参与云购的商品 已揭晓... $shoplist = $this->db->GetList("select *,sum(gonumber) as gonumber from `@#_member_go_record` a left join `@#_shoplist` b on a.shopid=b.id where a.uid='{$member['uid']}' and b.q_end_time is not null GROUP BY shopid "); $shoplistall['listItems'] = $this->db->GetList("select *,sum(gonumber) as gonumber from `@#_member_go_record` a left join `@#_shoplist` b on a.shopid=b.id where a.uid='{$member['uid']}' and b.q_end_time is not null GROUP BY shopid order by a.time desc limit {$FIdx},{$EIdx} "); } if (!empty($shoplistall['listItems'])) { $shoplistall['code'] = 0; $shoplistall['count'] = count($shoplistall['listItems']); foreach ($shoplistall['listItems'] as $key => $val) { $shoplistall['listItems'][$key]['q_user'] = get_user_name($val['q_uid']); $shoplistall['listItems'][$key]['q_end_time'] = microt($val['q_end_time']); if ($val['q_end_time'] != '') { //商品已揭晓 $shoplistall['listItems'][$key]['codeState'] = 3; continue; } elseif ($val['shenyurenshu'] == 0) { //商品购买次数已满 $shoplistall['listItems'][$key]['codeState'] = 2; continue; } else { //进行中 $shoplistall['listItems'][$key]['codeState'] = 1; } } } else { $shoplistall['code'] = 1; } $shoplistall['count'] = count($shoplist); echo json_encode($shoplistall); }
public function detail() { $member = $this->userinfo; $sd_id = abs(intval($this->segment(4))); $shaidan = $this->db->GetOne("select * from `@#_shaidan` where `sd_id`='{$sd_id}'"); $goods = $this->db->GetOne("select sid from `@#_shoplist` where `id` = '{$shaidan['sd_shopid']}'"); $goods = $this->db->GetOne("select id,qishu,money,q_uid,maxqishu,thumb,title from `@#_shoplist` where `sid` = '{$goods['sid']}' order by `qishu` DESC"); if (isset($_POST['submit'])) { $sdhf_syzm = _getcookie("checkcode"); $sdhf_pyzm = isset($_POST['sdhf_code']) ? strtoupper($_POST['sdhf_code']) : ''; $sdhf_id = $shaidan['sd_id']; $sdhf_userid = $member['uid']; $sdhf_content = $_POST['sdhf_content']; $sdhf_time = time(); $sdhf_username = _htmtocode(get_user_name($member)); $sdhf_img = _htmtocode($member['img']); if (empty($sdhf_content)) { _message("页面错误"); } if (empty($sdhf_pyzm)) { _message("请输入验证码"); } if ($sdhf_syzm != md5($sdhf_pyzm)) { _message("验证码不正确"); } $this->db->Query("INSERT INTO `@#_shaidan_hueifu`(`sdhf_id`,`sdhf_userid`,`sdhf_content`,`sdhf_time`,`sdhf_username`,`sdhf_img`)VALUES\n\t\t\t('{$sdhf_id}','{$sdhf_userid}','{$sdhf_content}','{$sdhf_time}','{$sdhf_username}','{$sdhf_img}')"); $sd_ping = $shaidan['sd_ping'] + 1; $this->db->Query("UPDATE `@#_shaidan` SET sd_ping='{$sd_ping}' where sd_id='{$shaidan['sd_id']}'"); _message("评论成功", WEB_PATH . "/go/shaidan/detail/" . $sd_id); } $shaidannew = $this->db->GetList("select * from `@#_shaidan` order by `sd_id` DESC limit 5"); $shaidan_hueifu = $this->db->GetList("select * from `@#_shaidan_hueifu` where `sdhf_id`='{$sd_id}' LIMIT 10"); foreach ($shaidan_hueifu as $k => $v) { $shaidan_hueifu[$k]['sdhf_content'] = _htmtocode($shaidan_hueifu[$k]['sdhf_content']); } if (!$shaidan) { _message("页面错误"); } $substr = substr($shaidan['sd_photolist'], 0, -1); $sd_photolist = explode(";", $substr); $title = $shaidan['sd_title'] . "_" . _cfg("web_name"); $keywords = $shaidan['sd_title']; $description = $shaidan['sd_title']; include templates("index", "detail"); }
public function shaidanajax() { $parm = htmlspecialchars($this->segment(4)); $p = htmlspecialchars($this->segment(5)) ? htmlspecialchars($this->segment(5)) : 1; //分页 $end = 10; $star = ($p - 1) * $end; if ($parm == 'new') { $sel = '`sd_time`'; } else { if ($parm == 'renqi') { $sel = '`sd_zhan`'; } else { if ($parm == 'pinglun') { $sel = '`sd_ping`'; } } } $count = $this->db->GetList("select * from `@#_shaidan` order by {$sel} DESC"); $shaidan = $this->db->GetList("select * from `@#_shaidan` order by {$sel} DESC limit {$star},{$end}"); foreach ($shaidan as $sd) { $user[] = get_user_name($sd['sd_userid']); $time[] = date("Y-m-d H:i", $sd['sd_time']); $member = $this->db->GetOne("select * from `@#_member` where `uid`='{$sd['sd_userid']}'"); $pic[] = $member['img']; } for ($i = 0; $i < count($shaidan); $i++) { $shaidan[$i]['user'] = $user[$i]; $shaidan[$i]['time'] = $time[$i]; $shaidan[$i]['pic'] = $pic[$i]; } $pagex = ceil(count($count) / $end); if ($p <= $pagex) { $shaidan[0]['page'] = $p + 1; } if ($pagex > 0) { $shaidan[0]['sum'] = $pagex; } else { if ($pagex == 0) { $shaidan[0]['sum'] = $pagex; } } echo json_encode($shaidan); }
/** * Update user data * * @param int $userId Customer unique identifier * @return void */ function admin_updateUserData($userId) { iMSCP_Events_Aggregator::getInstance()->dispatch(iMSCP_Events::onBeforeEditUser, array('userId' => $userId)); $fname = isset($_POST['fname']) ? clean_input($_POST['fname']) : ''; $lname = isset($_POST['lname']) ? clean_input($_POST['lname']) : ''; $firm = isset($_POST['firm']) ? clean_input($_POST['firm']) : ''; $gender = isset($_POST['gender']) ? clean_input($_POST['gender']) : ''; $zip = isset($_POST['zip']) ? clean_input($_POST['zip']) : ''; $city = isset($_POST['city']) ? clean_input($_POST['city']) : ''; $state = isset($_POST['state']) ? clean_input($_POST['state']) : ''; $country = isset($_POST['country']) ? clean_input($_POST['country']) : ''; $email = isset($_POST['email']) ? clean_input($_POST['email']) : ''; $phone = isset($_POST['phone']) ? clean_input($_POST['phone']) : ''; $fax = isset($_POST['fax']) ? clean_input($_POST['fax']) : ''; $street1 = isset($_POST['street1']) ? clean_input($_POST['street1']) : ''; $street2 = isset($_POST['street2']) ? clean_input($_POST['street2']) : ''; $userName = get_user_name($userId); if (empty($_POST['password'])) { $query = "\n\t\t\tUPDATE\n\t\t\t\t`admin`\n\t\t\tSET\n\t\t\t\t`fname` = ?, `lname` = ?, `firm` = ?, `zip` = ?, `city` = ?, `state` = ?, `country` = ?, `email` = ?,\n\t\t\t\t`phone` = ?, `fax` = ?, `street1` = ?, `street2` = ?, `gender` = ?\n\t\t\tWHERE\n\t\t\t\t`admin_id` = ?\n\t\t"; exec_query($query, array($fname, $lname, $firm, $zip, $city, $state, $country, $email, $phone, $fax, $street1, $street2, $gender, $userId)); } else { $query = "\n\t\t\tUPDATE\n\t\t\t\t`admin`\n\t\t\tSET\n\t\t\t\t`admin_pass` = ?, `fname` = ?, `lname` = ?, `firm` = ?, `zip` = ?, `city` = ?, `state` = ?,\n\t\t\t\t`country` = ?, `email` = ?, `phone` = ?, `fax` = ?, `street1` = ?, `street2` = ?, `gender` = ?\n\t\t\tWHERE\n\t\t\t\t`admin_id` = ?\n\t\t"; exec_query($query, array(cryptPasswordWithSalt($_POST['password']), $fname, $lname, $firm, $zip, $city, $state, $country, $email, $phone, $fax, $street1, $street2, $gender, $userId)); $query = "DELETE FROM `login` WHERE `user_name` = ?"; $stmt = exec_query($query, $userName); if ($stmt->rowCount()) { set_page_message(tr('User session successfully killed for password change.'), 'success'); } } iMSCP_Events_Aggregator::getInstance()->dispatch(iMSCP_Events::onAfterEditUser, array('userId' => $userId)); if (isset($_POST['send_data']) && !empty($_POST['password'])) { $query = 'SELECT `admin_type` FROM `admin` WHERE `admin_id` = ?'; $stmt = exec_query($query, $userId); if ($stmt->fields['admin_type'] == 'admin') { $admin_type = tr('Administrator'); } elseif ($stmt->fields['admin_type'] == 'reseller') { $admin_type = tr('Reseller'); } else { $admin_type = tr('Customer'); } send_add_user_auto_msg($userId, $userName, $_POST['password'], $_POST['email'], $_POST['fname'], $_POST['lname'], $admin_type); set_page_message(tr('Login data successfully sent to %s.', $userName), 'success'); } }
public function index() { $widget['jquery-ui'] = true; $this->assign("widget", $widget); $uid = get_user_id(); $deptid = get_dept_id(); $username = get_user_name(); // 通用流程 $this->flow = M('flow')->where('type = 96 and (user_id=' . $uid . ' or confirm like "%' . $deptid . '%" or confirm like "%' . $uid . '%")')->select(); //通用任务 $this->task = M('task')->where('type = "chengguo" and (user_id=' . $uid . ' or executor like "%' . $username . '%")')->select(); //申报加分 $this->shenbao = M('flow')->where('type = 44 and user_id=' . $uid)->select(); $config = D("UserConfig")->get_config(); $this->assign("home_sort", $config['home_sort']); $flow = M('flow')->select(); $emp_no = get_emp_no(); $uid = get_user_id(); //订教材 流程图 $flow = M('task')->where('name = "科研成果"')->select(); if (!empty($flow)) { //dump($flow); $this->isfa = 1; //第一步 $this->taskId = $flow[0]['id']; $taskFrom = $flow[0]['user_id']; //发起人id $taskId = $flow[0]['id']; //dump($taskId); $taskStatus = M('task_log')->where('task_id = "' . $taskId . '" and executor =' . $uid)->find(); dump($uid); if ($taskStatus['status'] == 4 or $taskFrom == $taskStatus['assigner']) { $this->iszhuan = 1; //第二步, 已转交 OR 发起人!=分配人 说明任务已被转交 } if ($taskStatus['status'] == 3) { $this->iszhuan = 1; //第二步 $this->iswan = 1; //第三步, 完成 } } $this->display(); }
public function log() { $widget['jquery-ui'] = true; $this->assign("widget", $widget); $uid = get_user_id(); $deptid = get_dept_id(); $username = get_user_name(); //未开 $tasks1 = M('task_log')->where('task_type=103 and status <3 and step =1')->getField('task_id id', 'task_id'); $where['id'] = array('in', $tasks1); $this->task = M('task')->where($where)->order("id desc")->limit(50)->select(); //已开 $tasks = M('task_log')->where('task_type=103 and status =3 and step =2')->getField('task_id id', 'task_id'); $where_done['id'] = array('in', $tasks); $this->task_done = M('task')->where($where_done)->limit(50)->select(); $config = D("UserConfig")->get_config(); $this->assign("home_sort", $config['home_sort']); $this->display(); }
public function init() { $db = System::load_sys_class("model"); $version = System::load_sys_config('version'); $v_time = $version['release']; $v_version = $version['version']; $ret = $db->GetOne("Describe `@#_shaidan_hueifu` sdhf_username"); if (!$ret) { return; } $hflist = $db->GetList("select * from `@#_shaidan_hueifu` where `sdhf_img` is null or `sdhf_img` = ''"); foreach ($hflist as $key => $val) { $user = $db->GetOne("select uid,username,email,mobile,img from `@#_member` where `uid` = '{$val['sdhf_userid']}'"); $username = get_user_name($user); $db->Query("UPDATE `@#_shaidan_hueifu` SET `sdhf_img` = '{$user['img']}',`sdhf_username` = '{$username}' where `id` = '{$val['id']}'"); } unlink(__FILE__); _message("数据库升级成功", G_WEB_PATH); }
public function index() { $widget['jquery-ui'] = true; $this->assign("widget", $widget); $uid = get_user_id(); $deptid = get_dept_id(); $username = get_user_name(); // 流程提交记录 $where['type'] = array("in", "104,105,106,107,108,109"); $this->flow = M('flow')->where($where)->select(); // $this->flow=M('flow')->where('type = 92 and (user_id='.$uid.' or confirm like "%'.$deptid.'%" or confirm like "%'.$uid.'%")')->select(); //通用任务 $this->task = M('task')->where('type = "shiyanshi" and (user_id=' . $uid . ' or executor like "%' . $username . '%")')->select(); //申报加分 $this->shenbao = M('flow')->where('type = 40')->select(); // and user_id='.$uid $config = D("UserConfig")->get_config(); $this->assign("home_sort", $config['home_sort']); $this->display(); }
function _insert() { $model = M('UserConfig'); if (false === $model->create()) { $this->error($model->getError()); } if (in_array('id', $model->getDbFields())) { $model->id = get_user_id(); } if (in_array('user_name', $model->getDbFields())) { $model->user_name = get_user_name(); } //保存当前数据对象 $list = $model->add(); if ($list !== false) { //保存成功 $this->assign('jumpUrl', get_return_url()); $this->success('新增成功!'); } else { //失败提示 $this->error('新增失败!'); } }
function print_settings_page() { $uid = get_user_id(); $username = get_user_name(); //check of otp auth has been enabled on account $otp_auth_enabled = user_getotpauth($uid); //retrieves otp_enabled flag from user table print "<h1>Welcome, {$username}, to the account settings page</h1>"; print " (<a href='logout.php'>logout</a> | <a href='settings.php'>account settings</a>)"; print "<h3>Your preferences</h3>"; print "<hr size=1 noshade>"; print "<form action='settings.php' method='post'>"; print "<a href='gen_otp_list.php'>Generate new otp list</a><br/><br/>"; if ($otp_auth_enabled) { print "<input type='checkbox' name='require_otp' checked>Require OTP login"; } else { print "<input type='checkbox' name='require_otp'>Require OTP login"; } print "<br/>"; print "<br/>"; print "<input type='submit' name='update' value='update'>"; print "</form>"; }
function savedeal() { $is_ajax = intval($_REQUEST['is_ajax']); if (!$GLOBALS['user_info']) { showErr($GLOBALS['lang']['PLEASE_LOGIN_FIRST'], $is_ajax); } $t = trim($_REQUEST['t']); if (!in_array($t, array("save", "publish"))) { showErr($GLOBALS['lang']['ERROR_TITLE'], $is_ajax); } if ($t == "save") { $data['is_delete'] = 2; } else { $data['is_delete'] = 0; } $data['name'] = strim($_REQUEST['borrowtitle']); if (empty($data['name'])) { showErr("请输入借款标题", $is_ajax); } $data['publish_wait'] = 1; $icon_type = strim($_REQUEST['imgtype']); if ($icon_type == "") { showErr("请选择借款图片类型", $is_ajax); } $icon_type_arr = array('upload' => 1, 'userImg' => 2, 'systemImg' => 3); $data['icon_type'] = $icon_type_arr[$icon_type]; if (intval($data['icon_type']) == 0) { showErr("请选择借款图片类型", $is_ajax); } switch ($data['icon_type']) { case 1: if (strim($_REQUEST['icon']) == '') { showErr("请上传图片", $is_ajax); } else { $data['icon'] = replace_public(strim($_REQUEST['icon'])); } break; case 2: $data['icon'] = replace_public(get_user_avatar($GLOBALS['user_info']['id'], 'big')); break; case 3: if (intval($_REQUEST['systemimgpath']) == 0) { showErr("请选择系统图片", $is_ajax); } else { $data['icon'] = $GLOBALS['db']->getOne("SELECT icon FROM " . DB_PREFIX . "deal_loan_type WHERE id=" . intval($_REQUEST['systemimgpath'])); } break; } $data['type_id'] = intval($_REQUEST['borrowtype']); if ($data['type_id'] == 0) { showErr("请选择借款用途", $is_ajax); } $data['borrow_amount'] = floatval($_REQUEST['borrowamount']); if ($data['borrow_amount'] < (int) trim(app_conf('MIN_BORROW_QUOTA')) || $data['borrow_amount'] > (int) trim(app_conf('MAX_BORROW_QUOTA')) || $data['borrow_amount'] % 50 != 0) { showErr("请正确输入借款金额", $is_ajax); } //判断是否需要额度 if ($GLOBALS['db']->getOne("SELECT is_quota FROM " . DB_PREFIX . "deal_loan_type WHERE id=" . $data['type_id']) == 1) { if (intval($GLOBALS['user_info']['quota']) != 0) { $can_use_quota = get_can_use_quota($GLOBALS['user_info']['id']); if ($data['borrow_amount'] > intval($can_use_quota)) { showErr("输入借款的借款金额超过您的可用额度<br>您当前可用额度为:" . $can_use_quota, $is_ajax); } } } $data['repay_time'] = intval($_REQUEST['repaytime']); if ($data['repay_time'] == 0) { showErr("借款期限", $is_ajax); } $data['rate'] = floatval($_REQUEST['apr']); $data['repay_time_type'] = intval($_REQUEST['repaytime_type']); $level_list = load_auto_cache("level"); $min_rate = 0; $max_rate = 0; $is_rate_lock = false; foreach ($level_list['repaytime_list'][$GLOBALS['user_info']['level_id']] as $kkk => $vvv) { if ($data['repay_time_type'] == 1) { if ($data['repay_time'] == intval($vvv[0]) && $vvv[1] == $data['repay_time_type']) { $min_rate = $vvv[2]; $max_rate = $vvv[3]; } } else { if ($data['repay_time'] <= intval($vvv[0]) && intval($vvv[1]) == $data['repay_time_type'] && $is_rate_lock == false) { $min_rate = $vvv[2]; $max_rate = $vvv[3]; $is_rate_lock = true; } elseif ($data['repay_time'] > intval($vvv[0]) && intval($vvv[1]) == $data['repay_time_type']) { $min_rate = $vvv[2]; $max_rate = $vvv[3]; } } } if (floatval($data['rate']) <= 0 || floatval($data['rate']) > $max_rate || floatval($data['rate']) < $min_rate) { showErr("请正确输入借款利率", $is_ajax); } $data['enddate'] = intval($_REQUEST['enddate']); $data['description'] = replace_public(btrim($_REQUEST['borrowdesc'])); $data['description'] = valid_tag($data['description']); if (trim($data['description']) == '') { showErr("请输入项目描述", $is_ajax); } $user_view_info = $GLOBALS['user_info']['view_info']; $user_view_info = unserialize($user_view_info); $new_view_info_arr = array(); for ($i = 1; $i <= intval($_REQUEST['file_upload_count']); $i++) { $img_info = array(); $img = replace_public(strim($_REQUEST['file_' . $i])); if ($img != "") { $img_info['name'] = strim($_REQUEST['file_name_' . $i]); $img_info['img'] = $img; $img_info['is_user'] = 1; $user_view_info[] = $img_info; $ss = $user_view_info; end($ss); $key = key($ss); $new_view_info_arr[$key] = $img_info; } } $datas['view_info'] = serialize($user_view_info); $GLOBALS['db']->autoExecute(DB_PREFIX . "user", $datas, "UPDATE", "id=" . $GLOBALS['user_info']['id']); $data['view_info'] = array(); foreach ($_REQUEST['file_key'] as $k => $v) { if (isset($user_view_info[$v])) { $data['view_info'][$v] = $user_view_info[$v]; } } foreach ($new_view_info_arr as $k => $v) { $data['view_info'][$k] = $v; } $data['view_info'] = serialize($data['view_info']); //资金运转 $data['remark_1'] = strim(replace_public($_REQUEST['remark_1'])); $data['remark_1'] = valid_tag($data['remark_1']); //风险控制措施 $data['remark_2'] = strim(replace_public($_REQUEST['remark_2'])); $data['remark_2'] = valid_tag($data['remark_2']); //政策及市场分析 $data['remark_3'] = strim(replace_public($_REQUEST['remark_3'])); $data['remark_3'] = valid_tag($data['remark_3']); //企业背景 $data['remark_4'] = strim(replace_public($_REQUEST['remark_4'])); $data['remark_4'] = valid_tag($data['remark_4']); //企业信息 $data['remark_5'] = strim(replace_public($_REQUEST['remark_5'])); $data['remark_5'] = valid_tag($data['remark_5']); //项目相关资料 $data['remark_6'] = strim(replace_public($_REQUEST['remark_6'])); $data['remark_6'] = valid_tag($data['remark_6']); //$data['voffice'] = intval($_REQUEST['voffice']); //$data['vposition'] = intval($_REQUEST['vposition']); $data['voffice'] = 1; $data['vposition'] = 1; $data['is_effect'] = 1; $data['deal_status'] = 0; $data['agency_id'] = intval($_REQUEST['agency_id']); $data['agency_status'] = 1; $data['warrant'] = intval($_REQUEST['warrant']); $data['guarantor_margin_amt'] = floatval($_REQUEST['guarantor_margin_amt']); $data['guarantor_pro_fit_amt'] = floatval($_REQUEST['guarantor_pro_fit_amt']); $data['user_id'] = intval($GLOBALS['user_info']['id']); $data['loantype'] = intval($_REQUEST['loantype']); if ($data['repay_time_type'] == 0) { $data['loantype'] = 2; } //当为天的时候 if ($data['repay_time_type'] == 0) { $true_repay_time = 1; } else { $true_repay_time = $data['repay_time']; } //本金担保 if ($data['warrant'] == 1) { $data['guarantor_amt'] = $data['borrow_amount']; } elseif ($data['warrant'] == 2) { //等额本息 if ($data['loantype'] == 0) { $data['guarantor_amt'] = pl_it_formula($data['borrow_amount'], $data['rate'] / 12 / 100, $true_repay_time) * $true_repay_time; } elseif ($data['loantype'] == 1) { $data['guarantor_amt'] = av_it_formula($data['borrow_amount'], $data['rate'] / 12 / 100) * $true_repay_time + $data['borrow_amount']; } elseif ($data['loantype'] == 2) { $data['guarantor_amt'] = $data['borrow_amount'] * $data['rate'] / 12 / 100 * $true_repay_time + $data['borrow_amount']; } } $data['create_time'] = TIME_UTC; $module = "INSERT"; $jumpurl = url("index", "borrow#steptwo"); $condition = ""; $deal_id = $GLOBALS['db']->getOne("SELECT id FROM " . DB_PREFIX . "deal WHERE ((is_delete=2 or is_delete=3) or (is_delete=0 and publish_wait=1)) AND user_id=" . $GLOBALS['user_info']['id']); if ($deal_id > 0) { $module = "UPDATE"; if ($t == "save") { $jumpurl = url("index", "borrow#stepone"); } $condition = "id = {$deal_id}"; } else { if ($t == "save") { $jumpurl = url("index", "borrow#stepone"); } } $GLOBALS['db']->autoExecute(DB_PREFIX . "deal", $data, $module, $condition); if ($module == "INSERT") { $deal_id = $GLOBALS['db']->insert_id(); } require_once APP_ROOT_PATH . 'app/Lib/deal.php'; $deal = get_deal($deal_id); //发送验证通知 if ($t != "save" && trim(app_conf('CUSTOM_SERVICE')) != '' && ($GLOBALS['user_info']['idcardpassed'] == 0 || $GLOBALS['user_info']['incomepassed'] == 0 || $GLOBALS['user_info']['creditpassed'] == 0 || $GLOBALS['user_info']['workpassed'] == 0)) { $ulist = explode(",", trim(app_conf('CUSTOM_SERVICE'))); $ulist = array_filter($ulist); if ($ulist) { $uuid = $ulist[array_rand($ulist)]; if ($uuid > 0) { $content = app_conf("SHOP_TITLE") . "用户您好,请尽快上传必要信用认证材料(包括身份证认证、工作认证、收入认证、信用报告认证)。另外,多上传一些可选信用认证,有助于您提高借款额度,也有利于出借人更多的了解您的情况,以便让您更快的筹集到所需的资金。请您点击'我要贷款',之后点击相应的审核项目,进入后,可先阅读该项信用认证所需材料及要求,然后按要求上传资料即可。 如果您有任何问题请您拨打客服电话 " . app_conf('SHOP_TEL') . " 或给客服邮箱发邮件 " . app_conf("REPLY_ADDRESS") . " 我们会及时给您回复。"; require_once APP_ROOT_PATH . 'app/Lib/message.php'; //添加留言 $message['title'] = $content; $message['content'] = htmlspecialchars(addslashes(valid_str($content))); $message['title'] = valid_str($message['title']); $message['create_time'] = TIME_UTC; $message['rel_table'] = "deal"; $message['rel_id'] = $deal_id; $message['user_id'] = $uuid; $message['is_effect'] = 1; $GLOBALS['db']->autoExecute(DB_PREFIX . "message", $message); //添加到动态 insert_topic("message", $message['rel_id'], $message['user_id'], get_user_name($message['user_id'], false), $GLOBALS['user_info']['id']); //自己给自己留言不执行操作 if ($deal['user_id'] != $message['user_id']) { $msg_conf = get_user_msg_conf($deal['user_id']); //站内信 if ($msg_conf['sms_asked'] == 1) { $notices['shop_title'] = app_conf("SHOP_TITLE"); $notices['shop_tel'] = app_conf('SHOP_TEL'); $notices['shop_address'] = app_conf("REPLY_ADDRESS"); /*{$notice.shop_title}用户您好,请尽快上传必要信用认证材料(包括身份证认证、工作认证、收入认证、信用报告认证)。另外,多上传一些可选信用认证,有助于您提高借款额度,也有利于出借人更多的了解您的情况,以便让您更快的筹集到所需的资金。请您点击'我要贷款',之后点击相应的审核项目,进入后,可先阅读该项信用认证所需材料及要求,然后按要求上传资料即可。 如果您有任何问题请您拨打客服电话{$notice.shop_tel}或给客服邮箱发邮件{$notice.shop_address}我们会及时给您回复。*/ $notices['url'] = "“<a href=\"" . $deal_info['url'] . "\">" . $deal_info['name'] . "</a>”"; $notices['user_name'] = get_user_name($message['user_id']); $notices['money'] = $user_load_data['true_repay_money'] + $user_load_data['impose_money']; $tmpl_content = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "msg_template where name = 'TPL_WORDS_MSG'", false); $GLOBALS['tmpl']->assign("notice", $notices); $contents = $GLOBALS['tmpl']->fetch("str:" . $tmpl_content['content']); send_user_msg("", $contents, 0, $deal['user_id'], TIME_UTC, 0, true, 13, $message['rel_id']); } //邮件 if ($msg_conf['mail_asked'] == 1 && app_conf('MAIL_ON') == 1) { $tmpl = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "msg_template where name = 'TPL_MAIL_DEAL_MSG'"); $tmpl_content = $tmpl['content']; $notice['user_name'] = $GLOBALS['user_info']['user_name']; $notice['msg_user_name'] = get_user_name($message['user_id'], false); $notice['deal_name'] = $deal['name']; $notice['deal_url'] = SITE_DOMAIN . url("index", "deal", array("id" => $deal['id'])); $notice['message'] = $message['content']; $notice['site_name'] = app_conf("SHOP_TITLE"); $notice['site_url'] = SITE_DOMAIN . APP_ROOT; $notice['help_url'] = SITE_DOMAIN . url("index", "helpcenter"); $GLOBALS['tmpl']->assign("notice", $notice); $msg = $GLOBALS['tmpl']->fetch("str:" . $tmpl_content); $msg_data['dest'] = $GLOBALS['user_info']['email']; $msg_data['send_type'] = 1; $msg_data['title'] = get_user_name($message['user_id'], false) . "给您的标留言!"; $msg_data['content'] = addslashes($msg); $msg_data['send_time'] = 0; $msg_data['is_send'] = 0; $msg_data['create_time'] = TIME_UTC; $msg_data['user_id'] = $GLOBALS['user_info']['id']; $msg_data['is_html'] = $tmpl['is_html']; $GLOBALS['db']->autoExecute(DB_PREFIX . "deal_msg_list", $msg_data); //插入 } } } } } if ($is_ajax == 1) { showSuccess($GLOBALS['lang']['SUCCESS_TITLE'], $is_ajax, $jumpurl); } else { app_redirect($jumpurl); } }
<body> <div class="header-title lr10"> <b>订单详情</b> </div> <div class="bk10"></div> <div class="table-list lr10"> <!--start--> <?php $shopid = $record['shopid']; $shop = $this->db->GetOne("SELECT * FROM `@#_shoplist` where `id`='{$shopid}'"); $qishu = array(); if (!$shop['q_uid']) { $qishu['ren'] = '还未开奖'; $qishu['ma'] = '还未开奖'; } else { $qishu['ren'] = get_user_name($user); $qishu['ma'] = $shop['q_user_code']; } ?> <div class="dingdan_content"> <h3 style="clear:both;display:block; line-height:30px;"><?php echo $shop['title']; ?> </h3> <li><b class="api_b">剩余次数:</b><?php echo $shop['shenyurenshu']; ?> 人次 </li> <li><b class="api_b">总需次数:</b><?php echo $shop['zongrenshu']; ?>
<?php } ?> <div class="spacer"></div> <p></p> <label>Workflow</label> <span id="error" class="small"></span> <input id="prev" type="button" value="Prev" onclick="prevStep();" /> <input id="next" type="button" value="Next" onclick="nextStep();" /> <div class="spacer"></div> </form> <?php if (check_login()) { echo "<p></p>"; echo "Logged in as " . get_user_name(); echo "<a href=\"index.php?logout\" id=\"logout\">logout</a>"; } ?> </div> <div id="output"></div> <div id="footer"><?php echo get_footer(); ?> </div> </div> </body> </html> <?php