?> <i class="vline">|</i> <?php echo W('Digg', array('feed_id' => $vl['feed_info']['feed_id'], 'digg_count' => $vl['feed_info']['digg_count'], 'diggArr' => $diggArr)); ?> <?php } ?> </span> <span> <a class="date" date="<?php echo $vl['feed_info']['publish_time']; ?> " href="<?php echo U('public/Profile/feed', array('feed_id' => $vl['feed_info']['feed_id'], 'uid' => $vl['feed_info']['uid'])); ?> "><em><?php echo friendlydate($vl["feed_info"]["publish_time"]); ?> </em><em style="display:none;">查看详情</em></a> <span><?php echo $vl['feed_info']['from']; ?> </span> </span> </p> <?php if ($vl['feed_info']['actions']['comment'] == 'true') { ?> <?php if ($vl['feed_info']['actions']['repost'] == 'true' && $canfeedshare) { ?> <?php
$usertypes .= $data->usertype_name; $usertypes .= '</option>'; } else { $usertypes .= '<option value="' . $data->usertypeID . '">'; $usertypes .= $data->usertype_name; $usertypes .= '</option>'; } } if (!$my_profile[0]->is_enabled) { $block .= '<input name="enabled" type="radio" value="1" >Yes'; $block .= '<input name="enabled" type="radio" value="0" checked>No'; } else { $block .= '<input name="enabled" type="radio" value="1" checked>Yes'; $block .= '<input name="enabled" type="radio" value="0" >No'; } $set_template = '../templates/edit_user_profile_manager.tpl.php'; break; default: $current_usertype = getGroup_name($my_profile[0]->usertypeID); $usertypes .= '<option value="' . $my_profile[0]->usertypeID . '" selected >'; $usertypes .= $current_usertype; $usertypes .= '</option>'; $set_template = '../templates/edit_user_profile.tpl.php'; break; } //echo $set_template; // ok baby, let start compiling the page now..go! go! go! {mh} $tpl = new template_parser($set_template); $tags = array('{FULLNAME}' => $my_profile[0]->fullname, '{USERNAME}' => $my_profile[0]->username, '{EMAIL}' => $my_profile[0]->email, '{HOMEADDRESS}' => $my_profile[0]->homeaddress, '{INTERESTS}' => $my_profile[0]->interest, '{CELNO}' => $my_profile[0]->celno, '{PHONENO}' => $my_profile[0]->phoneno, '{MESSAGE}' => $message, '{GROUP}' => $usertypes, '{CATEGORY}' => ' ' . $category_names, '{IS_ENABLED}' => $block, '{REGISTER_DATE}' => friendlyDate($my_profile[0]->registerDate), '{LAST_VISIT_DATE}' => friendlydate($my_profile[0]->lastvisitDate), '{SITENAME}' => 'CMS Adminss', '{HEADER}' => ' ', '{TOPNAV}' => 'top_menu.php', '{FOOTER}' => 'footer.php'); $tpl->parse_template($tags); print $tpl->display();
break; case 'approved': $row_data .= 'class="green">'; break; case 'published': $row_data .= 'class="cyan">'; break; default: $row_data .= 'class="black">'; break; } if ($status != "") { $row_data .= ' ' . $status; } else { $row_data .= ' --'; } $row_data .= '</td>'; $row_data .= '<td class="brown">'; $row_data .= ' ' . friendlydate($writer_articles_reports[$i]->created); $row_data .= '</td>'; $row_data .= '</tr">'; } } $dateprepared = time(); $dateprepared = friendlyDate($dateprepared); $rpt_title = "My written articles as of {$month} {$year}."; // Generate the page now $tpl = new template_parser('../templates/reports/preview_writer_reports.tpl.php'); $tags = array('{ARTICLE_TITLE}' => ' Article Title', '{CATEGORY}' => ' Category', '{FULLNAME}' => $fullname, '{POSITION}' => $position, '{DATE_CREATED}' => ' Date Written', '{DATE_PREPARED}' => $dateprepared, '{REPORT_TITLE}' => $rpt_title, '{STAGEID}' => 'Status', '{LINK}' => $link, '{PAGELINK}' => $pagelink->pagelinks, '{TABLE_DATA}' => $row_data, '{STYLESHEET}' => $stylesheet, '{SITENAME}' => 'CMS Adminss', '{FOOTER}' => 'footer.php'); $tpl->parse_template($tags); print $tpl->display();
$row_data .= 'class="red">'; break; case 'approved': $row_data .= 'class="green">'; break; case 'published': $row_data .= 'class="viola">'; break; default: $row_data .= 'class="black">'; break; } $row_data .= ' ' . $status; $row_data .= '</td>'; $row_data .= '<td class="brown">'; $row_data .= ' ' . friendlydate($my_articles[$i]->created); $row_data .= '</td>'; $row_data .= '<td class="black">'; $date = $my_articles[$i]->modified ? friendlyDate2($my_articles[$i]->modified) : '0'; $row_data .= ' ' . $date; $row_data .= '</td>'; $row_data .= '</tr">'; } } /** * Create an array of article status for the option lists */ $status = array("approved", "revise", "reject", "edited", "published", "live"); foreach ($status as $idx => $value) { if ($value == $_SESSION['optstatus']) { $optstatus .= "<option value='{$value}' selected>{$value}</option>";
<h3 class="post-tit"> <a href="<?php echo U('weiba/Index/postDetail', array('post_id' => $vo['post_id'])); ?> "><span><?php echo getshort($vo["title"], 20); ?> </span></a> </h3> <div class="post-info f10"> <div class="left"><span><?php echo $vo["user"]["space_link"]; ?> /<?php echo friendlydate($vo["post_time"]); ?> 发布</span> 最后回复<?php echo friendlydate($vo["last_reply_time"]); ?> </div> </div> </div> <div class="c3"> <div class="item mr10 ml0"> <span>浏览</span> <span><?php echo $vo["read_count"]; ?> </span> </div> <div class="item mr10 ml0"> <span>回复</span> <span><?php
?> </a> <?php echo W('Common/UserRank/render', array($weibo['uid'])); ?> </p> <div class="weibo_content_p"> <?php echo $weibo["fetchContent"]; ?> <span> <a href="<?php echo U('Weibo/Index/weiboDetail', array('id' => $weibo['id'])); ?> "><?php echo friendlydate($weibo["create_time"]); ?> </a> </span> <span><?php echo L('_FROM_'); ?> <?php if ($weibo['from'] == '') { echo L('_WEBSITE_SIDE_'); ?> <?php } else { ?> <strong><?php echo $weibo["from"];
$row_data .= 'class="red">'; break; } $row_data .= $tasks[$i]->priority; $row_data .= '</td>'; $row_data .= '<td '; switch ($tasks[$i]->status) { case 'Completed': $row_data .= 'class="green">'; break; case 'In Progress': $row_data .= 'class="viola">'; break; case 'Not Started': $row_data .= 'class="blue">'; break; } $row_data .= $tasks[$i]->status; $row_data .= '</td>'; $row_data .= '<td>'; $row_data .= ' ' . getUser_info($tasks[$i]->assignedto, 'fullname'); $row_data .= '</td>'; $row_data .= '</tr>'; } } $currentdate = friendlydate(time()); // ok baby, let start compiling the page now..go! go! go! {mh} $tpl = new template_parser('../templates/task_manager.tpl.php'); $tags = array('{SUBJECT}' => 'Subject', '{DUE_DATE}' => 'Due Date', '{PRIORITY}' => 'Priority', '{STATUS}' => 'Status', '{SITENAME}' => 'CMS Adminss', '{DATE_CREATED}' => 'Date Created', '{DATE_STARTED}' => 'Date Started', '{ASSIGN_TO}' => 'Assigned to', '{CURRENTDATE}' => $currentdate, '{MESSAGE}' => $message, '{NUMITEMS}' => '' . $totalrows, '{TABLE_DATA}' => $row_data, '{FROM_MONTH}' => $optmonth, '{FROM_DAY}' => $optday, '{FROM_YEAR}' => $optyear, '{PAGELINK}' => $pagelink->pagelinks, '{TOPNAV}' => 'top_menu.php', '{FOOTER}' => 'footer.php'); $tpl->parse_template($tags); print $tpl->display();
$row_data .= '<td>'; $row_data .= $j++; $row_data .= '</td>'; $row_data .= '<td>'; $row_data .= '<input type="checkbox" name="cid[]" id="cb' . $i . '" value="' . $tasks[$i]->taskID . '" onClick="isChecked(this.checked);"/>'; $row_data .= '</td>'; $row_data .= '<td>'; $row_data .= '<a href="' . VIEW_TASK_URL . $tasks[$i]->taskID . '">'; $row_data .= ' ' . $tasks[$i]->subject; $row_data .= '</a>'; $row_data .= '</td>'; $row_data .= '<td>'; $row_data .= ' ' . friendlydate($tasks[$i]->created_t); $row_data .= '</td>'; $row_data .= '<td>'; $row_data .= ' ' . friendlydate($tasks[$i]->enddate); $row_data .= '</td>'; $row_data .= '<td '; switch ($tasks[$i]->priority) { case 'High': $row_data .= 'class="green">'; break; case 'Low': $row_data .= 'class="viola">'; break; case 'Normal': $row_data .= 'class="red">'; break; } $row_data .= $tasks[$i]->priority; $row_data .= '</td>';
if (empty($sourceInfo['pic_url_small'])) { echo ' feed_txt_default'; } ?> "> <span class="source_info"><a href="<?php echo $sourceInfo["source_user_info"]["space_url"]; ?> " target="_blank" uid="<?php echo $sourceInfo["source_user_info"]["uid"]; ?> " event-node="face_card"><?php echo $sourceInfo["source_user_info"]["uname"]; ?> </a><em> <?php echo friendlydate($sourceInfo['publish_time']); ?> 发表在 <a href="<?php echo $sourceInfo['weiba_url']; ?> " target="_blank" class=""><?php echo $sourceInfo['weiba_name']; ?> </a><!--来自网站--></em></span> <p class="txt-mt" onclick="core.weibo.clickRepost(this);" href="<?php echo $sourceInfo['source_url']; ?> "><a target="_blank" href="<?php echo $sourceInfo['source_url']; ?> ">帖子 | <?php
$db->query($sql); $article_images = array(); while ($article_images[] = $db->fetcharray()) { } $thumbnail = ''; for ($i = 0; $i < count($article_images) - 1; $i++) { foreach ($article_images as $field => $value) { if ($field == 'imageID') { $x = makeRelativePath($article_images[$i]->image_filename, 4); $thumbnail .= '<div class="xpthumbnail">'; $thumbnail .= '<img src="' . $x . '" name="Image1" class="" width="200" height="100" border="0" >'; $thumbnail .= '<p><b>Photo by:</b>' . $article_images[$i]->image_photographer_author . '</p>'; $thumbnail .= '<p><b>Caption:</b>' . $article_images[$i]->image_captions . '</p>'; $thumbnail .= '<p><b>Alt:</b>' . $article_images[$i]->image_alttext . '</p>'; if ($article_images[$i]->show_image) { $thumbnail .= '<div align="center"><img src="images/apply_f2.png" border="0" alt="" align="" />'; $thumbnail .= '<p class="orange"><b>Selected</b></p>'; $thumbnail .= '</div>'; } $thumbnail .= '</div>'; } } } // start generating page $tpl = new template_parser('../templates/preview_article.tpl.php'); $tags = array('{TITLE}' => $title, '{ARTICLE_BODY}' => $article_body, '{THUMBNAIL}' => $thumbnail, '{DATE_CREATED}' => friendlydate($created), '{CATEGORY}' => $category_name, '{WRITER_NAME}' => $writer_name); $tpl->parse_template($tags); print $tpl->display(); ?>
public function coment_add_ajax() { $this->load->model('Model_issue', 'issue', TRUE); $this->load->model('Model_issuecomment', 'issuecomment', TRUE); $row = $this->issue->fetchOne($this->input->post('issue_id')); if (!$row) { $callBack = array('status' => false, 'message' => '无此数据', 'url' => '/'); exit; } $post = array('issue_id' => $this->input->post('issue_id'), 'content' => $this->input->post('content'), 'add_user' => $this->input->cookie('uids'), 'add_time' => time()); $feedback = $this->issuecomment->add($post); if (file_exists('./cache/users.conf.php')) { require './cache/users.conf.php'; } $this->load->helper('friendlydate'); if ($feedback['status']) { if ($this->input->cookie('uids') == $row['accept_user']) { $usertype = '当前受理人'; } else { $usertype = '路人甲'; } $callBack = array('status' => true, 'message' => array('content' => html_entity_decode($this->input->post('content')), 'username' => $users[$this->input->cookie('uids')]['username'], 'realname' => $users[$this->input->cookie('uids')]['realname'], 'addtime' => friendlydate(time()), 'usertype' => $usertype)); } else { $callBack = array('status' => false, 'message' => '提交失败'); } echo json_encode($callBack); }
$item = $items[$i]; ?> <tr class="row<?php echo $i % 2; ?> " id="item_<?php echo htmlspecialchars($item["identifier"]); ?> "> <td><?php echo friendlydate($item["uploaded"]); ?> </td> <td><?php if (!is_null($item["modified"])) { echo friendlydate($item["modified"]); } ?> </td> <td><a href="<?php echo SITEROOT_WEB; ?> ?page=itemList&user=<?php echo urlencode($item["user"]); ?> "><?php echo htmlspecialchars($item["user"]); ?> </a></td> <td><?php echo htmlspecialchars($item["title"]);
$j = $start + 1; for ($i = $start; $i < $start + $limit; $i++) { if ($files[$i]->filename) { $i % 2 == 0 ? $bgcolor = "" : ($bgcolor = "#F5F5F5"); $row_data .= '<tr class="tdhover" id= "tdata" bgcolor = "' . $bgcolor . '">'; $row_data .= '<td>'; $row_data .= $j++; $row_data .= '</td>'; $row_data .= '<td>'; $row_data .= '<input type="checkbox" name="cid[]" id="cb' . $i . '" value="' . $files[$i]->filename . '" onClick="isChecked(this.checked);"/>'; $row_data .= '</td>'; $row_data .= '<td>'; $row_data .= ' ' . $files[$i]->filename; $row_data .= '<a href="' . $backup_dir . $files[$i]->filename . '"> [ Download ]'; $row_data .= '</a>'; $row_data .= '</td>'; $row_data .= '<td class="blue2">'; $row_data .= ' ' . friendlydate($files[$i]->modified); $row_data .= '</td>'; $row_data .= '<td class="black">'; $row_data .= ' ' . $files[$i]->myfilesize . ' bytes '; $row_data .= '</td>'; $row_data .= '</tr">'; } } $numitems = $i; // ok baby, let start compiling the page now..go! go! go! {mh} $tpl = new template_parser('../templates/backup_restore_manager.tpl.php'); $tags = array('{FILENAME}' => 'Filename', '{CREATED}' => 'Created', '{SIZE}' => 'Size', '{TABLE_DATA}' => $row_data, '{PAGELINK}' => $pagelink->pagelinks, '{MESSAGE}' => $message, '{NUMITEMS}' => '' . $numitems, '{SITENAME}' => 'CMS Adminss', '{HEADER}' => '', '{TOPNAV}' => 'top_menu.php', '{FOOTER}' => 'footer.php'); $tpl->parse_template($tags); print $tpl->display();
$row_data .= '<td>'; $row_data .= $j++; $row_data .= '</td>'; $row_data .= '<td>'; $row_data .= '<input type="checkbox" name="cid[]" id="cb' . $i . '" value="' . $feedback[$i]->autoNumber . '" onClick="isChecked(this.checked);"/>'; $row_data .= '</td>'; $row_data .= '<td align="left">'; $row_data .= '<a href="' . VIEW_FEEDBACK_DETAIL . $feedback[$i]->autoNumber . '">'; $row_data .= '<input type="hidden" value = "' . $feedback[$i]->autoNumber . '">'; $row_data .= ' ' . $feedback[$i]->name; $row_data .= '</td>'; $row_data .= '<td class="red" >'; $row_data .= ' <a href="mailto:' . $feedback[$i]->emailAddress . '">' . $feedback[$i]->emailAddress; $row_data .= '</td>'; $row_data .= '<td align="left" class="blue2" >'; $row_data .= ' ' . $feedback[$i]->feedback; $row_data .= '</td>'; $row_data .= '<td align="left" class="blue2" >'; $row_data .= ' ' . friendlydate($feedback[$i]->feedbackDate); $row_data .= '</td>'; $row_data .= '<td align="left" class="blue2" >'; $row_data .= ' ' . $feedback[$i]->state; $row_data .= '</td>'; $row_data .= '</tr>'; } } // start generating page $tpl = new template_parser('../templates/feedback_manager.tpl.php'); $tags = array('{FULLNAME}' => 'Author', '{FEEDBACK}' => 'Feedback', '{EMAIL}' => 'Email', '{DATE}' => 'Date', '{TABLE_DATA}' => $row_data, '{NUMITEMS}' => '' . $totalrows, '{MESSAGE}' => $message, '{STATUS}' => 'Read', '{PAGELINK}' => $pagelink->pagelinks, '{SITENAME}' => 'CMS Adminss', '{HEADER}' => ' ', '{TOPNAV}' => 'top_menu.php', '{FOOTER}' => 'footer.php'); $tpl->parse_template($tags); print $tpl->display();
case 'add': $message = 'Successfully saved the user profile: ' . $_SESSION['title']; break; } unset($_SESSION['task']); } $db = new database(); $sql = " select * from content_users cu "; $sql .= " where cu.userID=" . $userID; if (!($result = $db->query($sql))) { die('Error:' . $db->error()); } // saved the user profile into an array.. $my_profile = array(); while ($row = $db->fetcharray()) { $my_profile[] = $row; } $_SESSION['clickuserID'] = $my_profile[0]->userID; $db->freeresult(); // Log the activity $action = new activity(); $action->track_activity($userID, $action->viewing_user_profile, $my_profile[0]->username); // Get the position of this user $group_name = getGroup_name($my_profile[0]->usertypeID); // Get his last visit date $lastvisitDate = $my_profile[0]->lastvisitDate ? friendlyDate($my_profile[0]->lastvisitDate) : '0000-00-00 00:00:00'; // ok baby, let start compiling the page now..go! go! go! {mh} $tpl = new template_parser('../templates/my_profile.tpl.php'); $tags = array('{FULLNAME}' => $my_profile[0]->fullname, '{USERNAME}' => $my_profile[0]->username, '{EMAIL}' => $my_profile[0]->email, '{HOMEADDRESS}' => $my_profile[0]->homeaddress, '{INTERESTS}' => $my_profile[0]->interest, '{CELNO}' => $my_profile[0]->celno, '{PHONENO}' => $my_profile[0]->phoneno, '{MESSAGE}' => $message, '{LIST_USERTYPEID}' => ' ' . $group_name, '{IS_ENABLED}' => $my_profile[0]->is_enabled, '{REGISTER_DATE}' => friendlydate($my_profile[0]->registerDate), '{LAST_VISIT_DATE}' => $lastvisitDate, '{SITENAME}' => 'CMS Adminss', '{HEADER}' => ' ', '{TOPNAV}' => 'top_menu.php', '{SIDENAV}' => 'user_menu2.php', '{FOOTER}' => 'footer.php'); $tpl->parse_template($tags); print $tpl->display();
?> <i class="vline">|</i> <?php echo W('Digg', array('feed_id' => $vl['feed_id'], 'digg_count' => $vl['digg_count'], 'diggArr' => $diggArr)); ?> </span> <span> <a class="date" date="<?php echo $vl["publish_time"]; ?> " href="<?php echo U('public/Profile/feed', array('feed_id' => $vl['feed_id'], 'uid' => $vl['uid'])); ?> "><em><?php echo friendlydate($vl["publish_time"]); ?> </em><em style="display:none;">查看详情</em></a> <span><?php echo $vl['from']; ?> </span> </span> </p> <div class="infopen"><div class="trigon"></div></div> <div class="forward_box"> <div class="bdsharebuttonbox share_feedlist clearfix" data-tag="share_feedlist"> <a href="javascript:;" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博">新浪微博</a> <a href="javascript:;" class="bds_weixin" data-cmd="weixin" title="分享到微信">微信</a> <a href="javascript:;" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博">腾讯微博</a> <a href="javascript:;" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间">QQ空间</a>
$registerdate = $_SESSION['registerdate']; $lastvisitdate = $_SESSION['lastvisitdate']; $faxno = $_SESSION['faxno']; $extrainfo = $_SESSION['extrainfo']; $status = $_SESSION['status']; // Log the activity $action = new activity(); $action->track_activity($userID, $action->editing_client_profile, 'Editing client profile ' . $_SESSION['clientname']); if (!$my_profile[0]->is_enabled) { $block .= '<input name="status" type="radio" value="1" checked >Yes'; $block .= '<input name="status" type="radio" value="0" >No'; } else { $block .= '<input name="status" type="radio" value="1" >Yes'; $block .= '<input name="status" type="radio" value="0" checked >No'; } if ($registerdate) { $registerdate = $_SESSION['registerdate']; } else { $registerdate = 0; } if ($clients[0]->lastvisitDate > 0) { $lastvisitDate = friendlydate($clients[0]->lastvisitDate); } else { $lastvisitDate = '0'; } $stylesheet = ' ../templates/admin2.css'; // ok baby, let start compiling the page now..go! go! go! {mh} $tpl = new template_parser('../templates/edit_clients_profile.tpl.php'); $tags = array('{CLIENTNAME}' => $clientname, '{USERNAME}' => $username, '{REGISTER_DATE}' => $registerdate, '{LAST_VISIT_DATE}' => $lastvisitdate, '{CONTACTNAME}' => $contactname, '{EMAIL}' => $emailadd, '{ADDRESS}' => $address, '{WEBSITE}' => $website1, '{PHONENO}' => $phoneno, '{FAXNO}' => $faxno, '{EXTRAINFO}' => $extrainfo, '{STATUS}' => $block, '{MESSAGE}' => $message, '{STYLESHEET}' => $stylesheet, '{SITENAME}' => 'CMS Adminss', '{HEADER}' => ' ', '{TOPNAV}' => 'top_menu.php', '{FOOTER}' => 'footer.php'); $tpl->parse_template($tags); print $tpl->display();
$thumbnail .= '<pre class="orange"><b>Select image:</b><input name="imageID[]' . '" type="checkbox" class="bigbox" value="' . $article_images[$i]->imageID . '" checked ></pre>'; } else { $thumbnail .= '<pre class="orange"><b>Select image:</b><input name="imageID[]' . '" type="checkbox" class="bigbox" value="' . $article_images[$i]->imageID . '" ></pre>'; } $thumbnail .= '<a href="#" onClick=popupWindow("' . "../admin/popups/edit_imageinfo.php?imgID=" . $article_images[$i]->imageID . '","win1",350,450,"no","yes");>'; $thumbnail .= '<b>Image Details</b>'; $thumbnail .= '</a>'; $thumbnail .= ' '; $thumbnail .= '<a href="#" onClick=popupWindow("' . "{$x}" . '",' . "{$i}" . ',350,350,"yes","yes");>'; $thumbnail .= '<b>Preview Image</b>'; $thumbnail .= '</a>'; $thumbnail .= '</div>'; } } } } // echo $set_template; // Get the authors name $author_name = getUser_info($userID, 'fullname'); $keywords = getArticle_keywords($_SESSION['articleID']); // Get the article body of this article.. // print_r($_SESSION); $article_body = $_SESSION['article_body']; $article_title = $_SESSION['title']; // echo $article_body; $created = $_SESSION['created']; // ok baby, lets start compiling the page now..go! go! go! {mh} $tpl = new template_parser($set_template); $tags = array('{STAGE}' => $stage, '{ARTICLE_TITLE}' => $article_title, '{DATE_CREATED}' => friendlydate($created), '{CATEGORY_NAMES}' => $category_names, '{TASKS}' => $tasklist, '{KEYWORDS}' => $keywords, '{AUTHOR}' => $author_name, '{THUMBNAIL}' => $thumbnail, '{MESSAGE}' => $message, '{BODY}' => $article_body, '{FRONTPAGE}' => $optfrontpage, '{SITENAME}' => 'CMS Adminss', '{HEADER}' => ' ', '{TOPNAV}' => '../admin/top_menu.php', '{FOOTER}' => 'footer.php'); $tpl->parse_template($tags); print $tpl->display();
// TODO; MUST allow the article to preview no matter what stages been set on.. // so, we hav to change the code into a flexible style.... $db = new database(); $sql = " select * from articles a "; $sql .= " where a.articleID=" . intval($articleID); if (!($result = $db->query($sql))) { die('Error:' . $db->error()); } $article = array(); while ($article[] = $db->fetcharray()) { } $title = $_SESSION['title']; $article_body = $_SESSION['article_body']; $category = $_SESSION['category']; $writer_name = $_SESSION['created_by']; $datecreated = friendlydate($_SESSION['created']); /** * Get the image sets of the article */ $sql = " select * from stockphotos s, "; $sql .= " article_imgs ai "; $sql .= " where ai.articleID=" . $_SESSION['articleID']; $sql .= " and ai.imageID = s.imageID "; $sql .= "and ai.show_image = 1"; $db->query($sql); $article_images = array(); while ($article_images[] = $db->fetcharray()) { } $thumbnail = ''; for ($i = 0; $i < count($article_images) - 1; $i++) { foreach ($article_images as $field => $value) {
?> " ucard="<?php echo $user["uid"]; ?> "><?php echo op_t($user["nickname"]); ?> </a><?php echo $user["icons_html"]; ?> 发布:<?php echo friendlydate($document["create_time"]); ?> | 回复:<?php echo friendlydate($document["last_reply_time"]); ?> </p> </div> </div> <?php if ($i != count($list)) { ?> <hr class="forum-list-hr" /> <?php } else { ?> <div class="forum-list-no-hr"></div><?php
include 'configuration.php'; require 'coreclass.php'; session_start(); if (!isset($_SESSION['login'])) { header('Location: login.php'); } if (isset($_SESSION['login'])) { $userID = $_SESSION['userID']; $usertype = $_SESSION['usertype']; } $db = new database(); $id = $_GET['id']; $sql = " select * from other_site_content \r\n\t\twhere id = '{$id}' "; if (!($result = $db->query($sql))) { die('Error:' . $db->error()); } while ($content[] = $db->fetcharray()) { } $db->freeresult(); $category = $content[0]->category; $datecreated = friendlydate($content[0]->created); $author = getUser_info($content[0]->author, 'fullname'); // start generating page $tpl = new template_parser('../templates/preview_sitecontent.tpl.php'); $tags = array('{CATEGORY}' => $category, '{AUTHOR}' => $author, '{DATE_CREATED}' => $datecreated, '{TITLE}' => $content[0]->title, '{BODY}' => $content[0]->body); $tpl->parse_template($tags); print $tpl->display(); ?>
while ($row = $db->fetcharray()) { $task_detail[] = $row; } $db->freeresult(); $_SESSION['taskID'] = $task_detail[0]->taskID; $_SESSION['subject'] = $task_detail[0]->subject; $_SESSION['description'] = $task_detail[0]->description; $_SESSION['created_t'] = $task_detail[0]->created_t; $_SESSION['startdate'] = $task_detail[0]->startdate; $_SESSION['enddate'] = $task_detail[0]->enddate; $_SESSION['priority'] = $task_detail[0]->priority; $_SESSION['status'] = $task_detail[0]->status; $_SESSION['assignedto'] = $task_detail[0]->assignedto; switch ($_SESSION['stageID']) { case 1: case 2: $set_template = "../templates/view_task_detail_writer.tpl.php"; break; case 3: $set_template = "../templates/view_task_detail.tpl.php"; break; } //print_r($_SESSION); // Log the activity $action = new activity(); $action->track_activity($userID, $action->viewing_quotes, 'Viewing the task detail of ' . $category_name); // start compiling the page.. $tpl = new template_parser($set_template); $tags = array('{SUBJECT}' => $task_detail[0]->subject, '{DESCRIPTION}' => $task_detail[0]->description, '{CREATED}' => friendlydate($task_detail[0]->created_t), '{STARTDATE}' => friendlydate($task_detail[0]->startdate), '{DUEDATE}' => friendlydate($task_detail[0]->enddate), '{STATUS}' => $task_detail[0]->status, '{PRIORITY}' => $task_detail[0]->priority, '{ASSIGNEDTO}' => getUser_info($task_detail[0]->assignedto, 'fullname'), '{SITENAME}' => 'CMS Adminss', '{HEADER}' => ' ', '{TOPNAV}' => 'top_menu.php', '{CONTENT}' => $row_data, '{FOOTER}' => 'footer.php'); $tpl->parse_template($tags); print $tpl->display();
<div class="media" id="comment-<?php echo $value['id']; ?> "> <div class="pull-left"> <div class="face"><img alt="" src="/static/avatar/<?php echo $users[$value['add_user']]['username']; ?> .jpg" align="absmiddle" title="<?php echo $users[$value['add_user']]['realname']; ?> "></div> </div> <div class="media-body"> <span class="media-meta pull-right"><?php echo friendlydate($value['add_time']); if ($value['add_user'] == $this->input->cookie('uids') && time() - $value['add_time'] < 3600) { ?> <br /><a class="del" ids="<?php echo $value['id']; ?> " href="javascript:;">删除</a><?php } ?> </span> <h4 class="text-primary"><?php echo $users[$value['add_user']]['realname']; ?> </h4> <small class="text-muted"><?php if ($row['add_user'] == $value['add_user']) {
} ?> </ins> </div> </div> <div class="q_black_info"> 回答数:<?php echo $data["answer_num"]; ?> <!--支持数:<?php echo $data["support"]; ?> --> 创建时间:<?php echo friendlydate($data["create_time"]); ?> </div> </div> <div class="col-xs-4 best_answer"> <?php if (!empty($data['best_answer_info'])) { ?> <div class="a_title"> <span class="q_black_info" style="line-height: 24px;vertical-align: middle;"> <?php if ($data['best_answer']) { ?> <img src="/Application/Question/Static/images/best_answer.png" style="width: 28px;"/> 最佳答案 <?php } else {