/** * 构造函数,检查配置是否完成 */ protected function __construct() { assert(isset($GLOBALS['config']['site']["commonPath"])); $this->appInfo =& getAppInfo(); $this->commonPath = $GLOBALS['config']['site']["commonPath"]; $this->root = $this->appInfo->system['root']; $this->ifAnalysis = false; }
public function change($data, $appid) { $result = $data; foreach ($result as &$value) { $replace = '/apps/' . getAppInfo($appid, 'APP_NAME') . '/index.php?s='; if (preg_match('/({SITE_URL})/i', $value)) { $value = str_replace($replace, '', $value); } } return $result; }
/** * 构造函数,检查配置是否完成 */ protected function __construct() { SimpleSession::init(null, getHash($_POST['FromUserName'])); if (!$_SESSION['wechatActivity']) { $_SESSION['wechatActivity'] = null; } if (!$_SESSION['callbackStack']) { $_SESSION['callbackStack'] = null; } $this->activity =& $_SESSION['wechatActivity']; $this->callbackStack =& $_SESSION['callbackStack']; $this->token = getConfig("wechat", "token"); $this->appInfo =& getAppInfo(); }
private function __construct() { $this->appInfo =& getAppInfo(); self::$root = $this->appInfo->system['root']; $this->result = array(); $this->system = $this->appInfo->system; // TODO 载入默认语言的代码放在这里不太合适 $this->language = array(); $defaultLanguage = getConfig("language", "default"); if (!empty($defaultLanguage)) { foreach (explode(",", $defaultLanguage) as $v) { $this->loadLanguage($v); } } }
protected function urlFormat($array) { $webRouter = getAppInfo()->webRouter; // 生成url if (isset($array['absolute'])) { $url = $webRouter->getAbsolute($array['absolute']); } else { if (isset($array['url'])) { $url = $array['url']; } else { $array += array("set" => null, "page" => null, "action" => null, "qus" => null); $url = $webRouter->getURL($array['set'], $array['page'], $array['action'], $array['qus']); } } return $url; }
private function __feedTemplate($feeds) { //feed的icon $feedTemplateDao = TS_D("FeedTemplate"); foreach ($feeds as $fkey => $feed) { //不用额外处理的动态部分 $feed_output[$fkey]["type"] = $feed["type"]; $feed_output[$fkey]["id"] = $feed["id"]; $feed_output[$fkey]["cTime"] = $feed["cTime"]; $feed_output[$fkey]["uid"] = $feed["uid"]; //TODO 临时数据转换 $feed['title'] = $feed['title_data']; $feed['body'] = $feed['body_data']; unset($feed['title_data']); unset($feed['body_data']); $feed_template = $feedTemplateDao->where(array("type" => $feed['type']))->find(); $feed_output[$fkey]["title"] = $this->__getTitle($feed_template['title'], $feed); $body_template = $feed_template["body"]; //body的模板 if ($body_template) { $feed_output[$fkey]["body"] = $this->__getBody($body_template, $feed); } $feed_output[$fkey]['icon'] = getAppInfo($feed['appid'], 'APP_ICON'); } return $feed_output; }
<?php $title = 'EduApp'; require_once 'core/includes/overall/header.inc.php'; ?> <?php if (isset($_GET['fullApp'])) { $appInfo = getAppInfo($_GET['fullApp']); $imageURL = getImage($appInfo['id'], 'apps', 'appThumb.gif'); $userID = $appInfo['uploadedBy']; $getUser = mysql_query("SELECT * FROM users WHERE id = {$userID}"); $users = mysql_fetch_assoc($getUser); if ($appInfo['name'] == "" || $appInfo['description'] == "") { header('Location: index.php'); } else { echo ' <div class="titleBar"> <h3>' . $appInfo['name'] . ' Details <span class="right">Uploaded by <a href="profile.php?user='******'id'] . '">' . $user['firstname'] . ' ' . $user['lastname'] . '</a></h3> </div> '; require_once 'core/includes/fullAppInfo.inc.php'; } } elseif (isset($_GET['catID'])) { $catID = (int) $_GET['catID']; $getCategoryName = mysql_query("SELECT * FROM categories WHERE catID = {$catID}"); $category = mysql_fetch_assoc($getCategoryName); echo ' <div class="titleBar"> <h3>Filtering by "' . $category['category'] . '"</h3> </div>
<html> <head> <title>BT Neo AIB - KM Portal</title> </head> <body> <?php include "header.php"; $appId = isset($_POST["SelectAppNames"]) ? $_POST["SelectAppNames"] : ''; require_once 'DBLogic.php'; $appAllData = getAppInfo($appId); $appNames[0] = $appAllData[0]['app_name']; $appId[0] = $appAllData[0]['app_id']; $appDescs[0] = $appAllData[0]['app_desc']; $appDiagrams = $appAllData[0]['app_intf_diagram']; $appfullfrom[0] = $appAllData[0]['FULLFORM']; $entityName = $appNames[0]; logRequest("View", $appNames[0]); ?> <table border=0 width="100%"> <tr> <td> <?php $_POST["searchStr"] = ""; ?> <table border=0 width="100%"> <tr> <td width="100%" align="center" style="color: #A62A2A" valign=middle> <font size=20pt font=arial><u> <?php echo $entityName; ?>
$keywordId = $searchData[0]['keyword_id']; $type = $searchData[0]['type']; $relatedWord = $searchData[0]['related_word']; $keywordInfo = $searchData[0]['keyword_info']; $keywordDesc = $searchData[0]['keyword_desc']; $appDiagrams = $searchData[0]['keyword_diagram']; $appIdPosted = isset($_POST['appId']) ? $_POST['appId'] : 0; // echo $searchStr; // echo $appIdPosted; if ($appIdPosted == 0) { $keywordAppMappingData = searchKeywordAppMapping($keywordId); } else { $keywordAppMappingData = searchKeywordAppMappingforRemarks($keywordId, $appIdPosted); } $appId = $keywordAppMappingData[0]['app_id']; $appData = getAppInfo($appId); $appName = $appData[0]['app_name']; $entityName = $searchData[0]['keyword_name']; // $fileNames = $appData[0]['app_intf_diagram']; // $outputStr = splitString($fileNames, ","); $combinedDesc = $keywordAppMappingData[0]['keyword_app_remarks']; //logRequest("Search",$searchStr); ?> <table width=100% border=0> <tr> <td width="100%" align="left" style="color: #A62A2A" valign=middle height="10%"> <font size=5pt font=arial><u>Result for: <?php echo $searchStr; ?> (Related with Application: <?php echo $appName;
protected function _replaceURL($var) { return getAppInfo($var[1], 'APP_URL'); }
function updateApplication($appId, $fileName) { $queryString = "select app_intf_diagram,app_name from app_name where app_id = " . $appId; $result = mysql_query($queryString) or die(mysql_error()); $existingDiagrams = ""; while ($row = mysql_fetch_array($result)) { $existingDiagrams = $row['app_intf_diagram']; } if (strpos($existingDiagrams, "Default") === false) { $fileName = $existingDiagrams . "," . $fileName; } $queryString = "update `app_name` set `app_intf_diagram` = '{$fileName}' where `app_id` = " . $appId; mysql_query($queryString) or die(mysql_error()); mysql_query("commit"); $appAllData = getAppInfo($appId); $keywordId = $appAllData[0]['app_id']; $queryString = "update `keywords` set `keyword_diagram` = '{$fileName}' where `keyword_id` = " . $keywordId; echo $queryString; mysql_query($queryString) or die(mysql_error()); mysql_query("commit"); logRequest("App updated id = ", $appId . " with new file uploaded"); }
<?php require_once 'DBLogic.php'; $searchStr = isset($_POST['searchStr']) ? $_POST['searchStr'] : ''; $index = isset($_POST['index']) ? $_POST['index'] : 0; $searchData = searchKeyword($searchStr, $index); $keywordId = $searchData[0]['keyword_id']; $type = $searchData[0]['type']; $relatedWord = $searchData[0]['related_word']; $keywordInfo = $searchData[0]['keyword_info']; $keywordDesc = $searchData[0]['keyword_desc']; $keywordAppMappingData = searchKeywordAppMapping($keywordId); $appIds = array(); $appNames = array(); for ($i = 0; $i < count($keywordAppMappingData); $i++) { $appIds[$i] = $keywordAppMappingData[$i]['app_id']; $appData = getAppInfo($appIds[$i]); $appNames[$i] = $appData[0]['app_name']; } ?> <table width="100%" border=0> <tr> <td width="100%" align="left" style="color: #A62A2A;;font-family:arial;size:5pt" valign=middle height="10%"><u>Result for: <?php echo $searchStr; ?> (Related with Application: <?php echo $keywordInfo; ?> )</u></td> </tr> <tr><td> </td></tr>