コード例 #1
0
ファイル: index.php プロジェクト: rezarahimi4861/icmf
     $system->xorg->smarty->assign("add", $system->xorg->smarty->fetch("{$settings['moduleAddress']}/{$settings['moduleName']}/{$settings['viewAddress']}/{$settings['tplAddress']}/object/add" . $settings['ext4']));
     //		$system->xorg->smarty->assign("list", $c_backlink->c_listObject());
     $system->xorg->smarty->display("{$settings['moduleAddress']}/{$settings['moduleName']}/{$settings['viewAddress']}/{$settings['tplAddress']}/object" . $settings['ext4']);
     break;
     // Add Object
 // Add Object
 case "v_addObject":
     $system->xorg->smarty->display("{$settings['moduleAddress']}/{$settings['moduleName']}/{$settings['viewAddress']}/{$settings['tplAddress']}/object/add" . $settings['ext4']);
     break;
 case "c_addObject":
     $c_backlink->c_addObject($_POST);
     break;
     // Edit Object
 // Edit Object
 case "v_editObject":
     $system->xorg->smarty->assign("comments", m_comment::m_listObject('showListObjectSimple', "op=backlink,opid={$taskInfo['id']}"));
     $system->xorg->smarty->assign("history", $c_backlink->c_logReader($taskInfo['id']));
     $system->xorg->prompt->promptShow('p', $lang['edit'], $system->xorg->smarty->fetch("{$settings['moduleAddress']}/backlink/{$settings['viewAddress']}/{$settings['tplAddress']}/object/edit" . $settings['ext4']));
     break;
 case "c_editObject":
     $c_backlink->c_editObject($_POST);
     break;
     // Del Object
 // Del Object
 case "v_delObject":
     $system->xorg->smarty->assign("entity", $entity = $system->dbm->db->informer("`{$settings['task']}`", "`id` = '{$_POST['id']}'"));
     $system->xorg->smarty->assign("text", sprintf($lang['doYouWantDeleteObject'], $entity['subject']));
     $system->xorg->prompt->promptShow('p', $lang[delObject], $system->xorg->smarty->fetch("{$settings['moduleAddress']}/{$settings['moduleName']}/{$settings['viewAddress']}/{$settings['tplAddress']}/object/del" . $settings['ext4']));
     break;
 case "c_delObject":
     $c_backlink->c_delObject($_POST[id]);
コード例 #2
0
ファイル: post.php プロジェクト: rezarahimi4861/icmf
 public function m_listObject($viewMode, $filter = null, $sort = null)
 {
     global $system, $lang, $settings;
     $time = time();
     if (strstr($filter, '_')) {
         $filter = explode("_", $filter);
         $id = $filter[0];
         $filter = "id={$id}";
         $filterFlag = 1;
         $filter = !empty($filter) ? $system->filterSplitter($filter) : null;
         $system->dbm->db->update("`{$settings['postObject']}`", "`viewCount` = `viewCount`+1", "`id` = {$id}");
         $system->xorg->pagination->paginateStart("post", "c_{$viewMode}" . 'Object', "`active`, `id`, `title`, `category`, `description`, `startTime`, `endTime`, `resources`, `filePath`, `contentType`, `contentPath`, `author`, `viewCount`", "`{$settings['postObject']}`", "`active` = 1 AND `startTime` < {$time} {$filter}");
     } else {
         $filter = !empty($filter) ? $system->filterSplitter($filter) : null;
         $sort = !empty($sort) ? $sort : 'timeStamp DESC';
         $system->xorg->pagination->paginateStart("post", "c_{$viewMode}" . 'Object', "`active`, `id`, `title`, `category`, `startTime`, `brief`, `contentType`, `contentPath`, `viewCount`", "`{$settings['postObject']}`", "(`category` < 20 OR `category` > 26) AND `active` = 1 AND `startTime` < {$time} {$filter}", "{$sort}", "", "", "", "", 5, 7);
     }
     $count = 1;
     while ($row = $system->dbm->db->fetch_array()) {
         $entityList[$count]['num'] = $count;
         $entityList[$count]['active'] = $row['active'];
         $entityList[$count]['id'] = $row['id'];
         $entityList[$count]['category'] = $entityList[$count]['contentType'] = $row['contentType'];
         $entityList[$count]['title'] = $row['title'];
         $entityList[$count]['brief'] = $row['brief'];
         $entityList[$count]['contentPath'] = $row['contentPath'];
         $entityList[$count]['viewCount'] = $viewCount = $row['viewCount'];
         $entityList[$count]['startTime'] = $system->time->iCal->dator($row['startTime'], 2);
         $entityList[$count]['dayCount'] = $dayCount = floor(($time - $row['startTime']) / 86400);
         $entityList[$count]['weight'] = round($viewCount / $dayCount, 2);
         $entityList[$count]['category'] = $system->dbm->db->informer("`{$settings['postCategory']}`", "`id` = {$row['category']}", 'name');
         if ($filterFlag == 1) {
             $author = $system->dbm->db->informer("`{$settings['userTable']}`", "`id` = {$row['author']}");
             $entityList[$count]['author'] = $author['userName'];
             $entityList[$count]['authorFirstName'] = $author['firstName'];
             $entityList[$count]['authorLastName'] = $author['lastName'];
             $entityList[$count]['googlePlus'] = $author['googlePlus'];
             $entityList[$count]['facebook'] = $author['facebook'];
             $entityList[$count]['twitter'] = $author['twitter'];
             $entityList[$count]['authorPic'] = $author['userPic'];
             $entityList[$count]['description'] = $row['description'];
             $entityList[$count]['startTimeDateTime'] = $system->time->iCal->dator($row['startTime'], 'dateTime');
             //				$entityList[$count][endTime] = $system->time->iCal->dator($row[endTime], 2);
             //				$entityList[$count][endTimeDateTime] = $system->time->iCal->dator($row[endTime], 'dateTime');
             $entityList[$count][resources] = nl2br($row[resources]);
             if (!empty($row[filePath])) {
                 $attachs = explode(",", $row[filePath]);
                 foreach ($attachs as $attach) {
                     $filePath .= "<a href='{$attach}'>{$attach}</a><br>";
                 }
                 $entityList[$count][filePath] = $filePath;
             }
             require_once 'module/comment/config/config.php';
             require_once 'module/comment/model/comment.php';
             $m_comment = new m_comment();
             $entityList[$count][comments] = $m_comment->m_listObject('showListObject', "op=post,opid={$row['id']}");
         }
         $count++;
     }
     $system->xorg->smarty->assign("navigation", $system->xorg->pagination->renderFullNav());
     $system->xorg->smarty->assign("entityList", $entityList);
     return $system->xorg->smarty->display($settings[moduleAddress] . "/post/view/tpl/object/{$viewMode}" . $settings[ext4]);
 }
コード例 #3
0
ファイル: env.php プロジェクト: rezarahimi4861/icmf
require_once "module/userMan/model/userMan.php";
$userMan = new m_userMan();
$system->xorg->smarty->assign("login", $userMan->m_loginContent());
################################
# Forum                        #
################################
//require_once "module/forum/config/config.php";
//require_once "module/forum/model/forum.php";
//$m_forum = new m_forum();
//$system->xorg->smarty->assign("lastForum", $m_forum->m_listObject(5));
################################
# Comments                     #
################################
require_once "module/comment/config/config.php";
require_once "module/comment/model/comment.php";
$m_comment = new m_comment();
$system->xorg->smarty->assign("lastComment", $m_comment->m_listObject('showListObjectSimple', 'op=post'));
################################
# Fs Network Panel             #
################################
//$system->xorg->smarty->assign("fsNetwork", $system->xorg->smarty->fetch($settings[commonTpl] . "fsNetwork". $settings['ext4']));
################################
# Menu                         #
################################
//$system->xorg->smarty->assign("menu", $system->xorg->smarty->fetch($settings[commonTpl] . "menu". $settings['ext4']));
################################
# Panel                        #
################################
//$system->xorg->smarty->assign("panel", $system->xorg->smarty->fetch($settings[commonTpl] . 'panel' . $settings[ext4]));
################################
# Header                       #
コード例 #4
0
ファイル: userMan.php プロジェクト: rezarahimi4861/icmf
 public function m_userList($filter = null, $viewMode = 'show')
 {
     global $lang, $settings, $system;
     $filter = $system->filterSplitter($filter);
     $system->xorg->pagination->paginateStart("userMan", "c_userList", "`id`, `active`, `timeStamp`, `uType`, `firstName`, `coName`, `workField`, `regTime`, `workDetails`, `lastName`, `fatherName`, `userName`, `userPic`, `gender`, `idNumber`, `nationalCode`, `nationalCode`, `state`, `issued`, `region`, `district`, `zipcode`, `address`, `nationality`, `religion`, `financialStatus`, `level`, `mobile`, `showMobile`, `phone`, `email`, `showEmail`, `googlePlus`, `facebook`, `twitter`", "`{$this->userTable}`", "1 {$filter}", "`timeStamp` ASC");
     $count = 1;
     while ($row = $system->dbm->db->fetch_array()) {
         $userList[$count]['count'] = $count;
         $userList[$count]['id'] = $id = $row[id];
         $userList[$count]['active'] = $row[active] == 1 ? $lang[active] : $lang[notActive];
         $userList[$count]['timeStamp'] = $system->time->iCal->dator($row[timeStamp]);
         $userList[$count]['uType'] = $row[uType];
         $userList[$count]['firstName'] = $row[firstName];
         $userList[$count]['coName'] = $row[coName];
         $userList[$count]['workField'] = $row[workField];
         $userList[$count]['regTime'] = $row[regTime];
         $userList[$count]['workDetails'] = $row[workDetails];
         $userList[$count]['lastName'] = $row[lastName];
         $userList[$count]['fatherName'] = $row[fatherName];
         $userList[$count]['userName'] = $userName = $row[userName];
         $userList[$count]['userPic'] = empty($row[userPic]) ? "theme/{$settings['theme']}/img/defaultUserPic.jpg" : "{$row['userPic']}";
         $userList[$count]['genderId'] = $row[gender];
         $userList[$count]['gender'] = $system->dbm->db->informer("`{$this->genderTable}`", "`id` = {$row['gender']}", 'name');
         $userList[$count]['idNumber'] = $row[idNumber];
         $userList[$count]['nationalCode'] = $row[nationalCode];
         $userList[$count]['nationalityId'] = $row[nationality];
         $userList[$count]['nationality'] = $system->dbm->db->informer("`{$this->countriesTable}`", "`id` = {$row['nationality']}", 'name');
         $userList[$count]['issuedId'] = $row[issued];
         $userList[$count]['issued'] = $system->dbm->db->informer("`{$this->cityTable}`", "`id` = {$row['issued']}", 'name');
         $userList[$count]['stateId'] = $row[state];
         $userList[$count]['state'] = $system->dbm->db->informer("`{$this->stateTable}`", "`id` =  {$row['state']}", 'name');
         $userList[$count]['regionId'] = $row[region];
         $userList[$count]['region'] = $system->dbm->db->informer("`{$settings['region']}`", "`id` =  {$row['region']}", 'name');
         $userList[$count]['districtId'] = $row[district];
         $userList[$count]['district'] = $system->dbm->db->informer("`{$settings['district']}`", "`id` =  {$row['district']}", 'name');
         $userList[$count]['address'] = $row[address];
         $userList[$count]['zipcode'] = $row[zipcode];
         $userList[$count]['religionId'] = $row[religion];
         $userList[$count]['religion'] = $system->dbm->db->informer("`{$this->religionTable}`", "`id` = {$row['religion']}", 'name');
         $userList[$count]['financialStatusId'] = $row[financialStatus];
         $userList[$count]['financialStatus'] = $system->dbm->db->informer("`{$this->statusTable}`", "`id` = {$row['financialStatus']}", 'name');
         $userList[$count]['levelId'] = $row[level];
         $userList[$count]['level'] = $system->dbm->db->informer("`{$this->levelTable}`", "`id` = {$row['level']}", 'name');
         $userList[$count]['googlePlus'] = $row['googlePlus'];
         $userList[$count]['facebook'] = $row['facebook'];
         $userList[$count]['twitter'] = $row['twitter'];
         $userList[$count]['mobile'] = $row[mobile];
         $userList[$count]['showMobile'] = $row[showMobile];
         $userList[$count]['phone'] = $row[phone];
         $userList[$count]['email'] = $row[email];
         $userList[$count]['showEmail'] = $row[showEmail];
         $count++;
     }
     $system->xorg->smarty->assign("navigation", $system->xorg->pagination->renderFullNav());
     $system->xorg->smarty->assign("userList", $userList);
     if ($count > 2) {
         $system->xorg->smarty->display($settings[moduleAddress] . "/" . $this->moduleName . "/view/tpl/userList" . $settings[ext4]);
     } else {
         if ($viewMode == 'show') {
             $system->xorg->smarty->display($settings[moduleAddress] . "/" . $this->moduleName . "/view/tpl/profile" . $settings[ext4]);
         } elseif ($viewMode == 'home') {
             if ($system->dbm->db->count_records("`user`", "`userName` = '{$userName}'") == 1) {
                 require_once 'module/post/model/post.php';
                 $system->xorg->smarty->assign("postList", m_post::m_listObject('showList', 'author=' . $id));
                 require_once 'module/comment/model/comment.php';
                 $system->xorg->smarty->assign("commentList", m_comment::m_listObject('showListObjectSimple', 'uid=' . $id . ',op=post'));
                 $system->xorg->smarty->assign("personalPage", $system->dbm->db->informer("`{$settings['userExtraInfo']}`", "`uid` = {$id}", "pageSource"));
                 $system->xorg->smarty->display($settings[moduleAddress] . "/" . $this->moduleName . "/view/tpl/home" . $settings['ext4']);
             } else {
                 $system->xorg->smarty->display($settings[commonTpl] . "404" . $settings['ext4']);
             }
         }
     }
 }