本文整理汇总了PHP中system_error函数的典型用法代码示例。如果您正苦于以下问题:PHP system_error函数的具体用法?PHP system_error怎么用?PHP system_error使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了system_error函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: top
function top($name, $method, $data, $data1)
{
global $_G;
if ($_G['TOP'] == NULL) {
include_once ROOT_PATH . 'top/TopClient.php';
$c = new TopClient();
$c->format = 'json';
$_G['TOP'] = $c;
}
//1=百川接口 0=淘客接口
if ($_G['setting']['api_type'] == 1) {
if ($_G['setting'][appkey] && $_G['setting'][secretKey]) {
$c->appkey = trim($_G[setting]['appkey']);
$c->secretKey = trim($_G[setting]['secretKey']);
} else {
msg('百川appkey未配置,无法进行操作');
}
} else {
if ($_G['setting'][taoke_appkey] && $_G['setting'][taoke_secretKey]) {
$c->appkey = trim($_G[setting]['taoke_appkey']);
$c->secretKey = trim($_G[setting]['taoke_secretKey']);
} else {
msg('淘宝客appkey未配置,无法进行操作');
}
}
if (!$name) {
return $_G['TOP'];
}
if (defined('ERROR') && ERROR === true) {
return false;
}
if (is_array($name)) {
$arr = $name;
} else {
$arr = array('name' => $name, 'method' => $method, 'data' => $data, 'data1' => $data1);
}
if (!preg_match("/^[a-zA-Z_]+\$/is", $arr[name])) {
return false;
}
$file_name = 'api/' . $arr[name];
if ((include_once libfile($file_name)) === false) {
system_error('system', 'api文件不存在' . $v);
return false;
}
$class = "api_" . $arr[name];
$res = new $class();
if ($arr[method] && method_exists($res, $arr[method])) {
$me = $arr[method];
return $res->{$me}($arr[data], $arr[data1]);
}
return $res;
}
开发者ID:lqlstudio,项目名称:ttae_open,代码行数:52,代码来源:tae.function.php
示例2: get_suggestions
/**
*
* Returns array of people containing entity, mutuals (friends), groups (shared) and priority
* @param Int $guid
* @param Int $friends_limit
* @param Int $groups_limit
* @return Array
*/
function get_suggestions($guid, $friends_of_friends_limit = 10, $groups_members_limit = 10)
{
$dbprefix = elgg_get_config('dbprefix');
$guid = sanitize_int($guid);
$suggestions = array();
if ($friends_of_friends_limit) {
// get some friends of friends
$options = array('selects' => array('COUNT(fof.guid_two) as priority'), 'type' => 'user', 'joins' => array("JOIN {$dbprefix}users_entity ue ON ue.guid = e.guid", "JOIN {$dbprefix}entity_relationships fr ON fr.guid_one = {$guid} AND fr.relationship = 'friend'", "JOIN {$dbprefix}entity_relationships fof ON fof.guid_one = fr.guid_two AND fof.relationship = 'friend'"), "wheres" => array("ue.banned = 'no'", "e.guid NOT IN (SELECT f.guid_two FROM {$dbprefix}entity_relationships f WHERE f.guid_one = {$guid} AND f.relationship = 'friend')", "fof.guid_two = e.guid", "e.guid != {$guid}"), 'group_by' => 'e.guid', 'order_by' => 'priority desc, ue.last_action desc', 'limit' => abs((int) $friends_of_friends_limit));
$fof = elgg_get_entities($options);
if (!is_array($fof)) {
system_error("Revisar foreach de lib/functions");
}
foreach ($fof as $f) {
$priority = (int) $f->getVolatileData('select:priority');
$suggestions[$f->guid] = array('entity' => $f, 'mutuals' => $priority, 'groups' => 0, 'priority' => $priority);
}
}
if ($groups_members_limit) {
// get some mutual group members
$options = array('selects' => array('COUNT(mog.guid_two) as priority'), 'type' => 'user', 'joins' => array("JOIN {$dbprefix}users_entity ue ON ue.guid = e.guid", "JOIN {$dbprefix}entity_relationships g ON g.guid_one = {$guid} AND g.relationship = 'member'", "JOIN {$dbprefix}groups_entity ge ON ge.guid = g.guid_two", "JOIN {$dbprefix}entity_relationships mog ON mog.guid_two = g.guid_two AND mog.relationship = 'member'"), "wheres" => array("ue.banned = 'no'", "e.guid NOT IN (SELECT f.guid_two FROM {$dbprefix}entity_relationships f WHERE f.guid_one = {$guid} AND f.relationship = 'friend')", "mog.guid_one = e.guid", "e.guid != {$guid}"), 'group_by' => 'e.guid', 'order_by' => 'priority desc, ue.last_action desc', 'limit' => 3);
// get members of groups
$mog = elgg_get_entities($options);
if (!is_array($mog)) {
system_error("Revisar foreach de lib/functions2");
}
foreach ($mog as $m) {
if (!isset($suggestions[$m->guid])) {
$priority = (int) $m->getVolatileData('select:priority');
$suggestions[$m->guid] = array('entity' => $m, 'mutuals' => 0, 'groups' => $priority, 'priority' => $priority);
} else {
$priority = (int) $m->getVolatileData('select:priority');
$suggestions[$m->guid]['groups'] = $priority;
$suggestions[$m->guid]['priority'] += $priority;
}
}
}
// sort by priority
usort($suggestions, __NAMESPACE__ . '\\trip_companions_sorter');
return $suggestions;
}
开发者ID:rosanamontes,项目名称:teranga.go,代码行数:48,代码来源:functions.php
示例3: systeminc
function systeminc($file)
{
if (!(include 'src/' . $file . '.php')) {
system_error('Could not get system file for ' . $file);
}
}
开发者ID:hellagent75,项目名称:ign_live,代码行数:6,代码来源:_settings.php
示例4: delete_trip_assessments
function delete_trip_assessments($trip_guid)
{
$list = elgg_get_entities_from_metadata(['type' => 'object', 'subtype' => 'evaluation_content', 'metadata_name_value_pairs' => array(array('name' => 'trip', 'value' => $trip_guid, 'operand' => '='))]);
if (!$list) {
//system_message("empty-list");
return;
}
$theTrip = get_entity($trip_guid);
if (!is_array($list)) {
system_error("Revisar foreach de lib/TC");
}
foreach ($list as $evaluation) {
if ($evaluation->trip == $trip_guid) {
//this must be
delete_assessment($evaluation->guid);
} else {
register_error("no-concordance");
}
}
unset($theTrip->grade);
}
开发者ID:rosanamontes,项目名称:teranga.go,代码行数:21,代码来源:trip_companions.php
示例5: checkquery
public static function checkquery($sql)
{
if (self::$config === null) {
$_config = array();
$_config['status'] = 1;
$_config['dfunction']['0'] = 'load_file';
$_config['dfunction']['1'] = 'hex';
$_config['dfunction']['2'] = 'substring';
$_config['dfunction']['3'] = 'if';
$_config['dfunction']['4'] = 'ord';
$_config['dfunction']['5'] = 'char';
$_config['daction']['0'] = 'intooutfile';
$_config['daction']['1'] = 'intodumpfile';
$_config['daction']['2'] = 'unionselect';
$_config['daction']['3'] = '(select';
$_config['daction']['4'] = 'unionall';
$_config['daction']['5'] = 'uniondistinct';
$_config['dnote']['0'] = '/*';
$_config['dnote']['1'] = '*/';
$_config['dnote']['2'] = '#';
$_config['dnote']['3'] = '--';
$_config['dnote']['4'] = '"';
$_config['dlikehex'] = 1;
$_config['afullnote'] = '0';
self::$config = $_config;
}
if (self::$config['status']) {
$cmd = trim(strtoupper(substr($sql, 0, strpos($sql, ' '))));
if (in_array($cmd, self::$checkcmd)) {
$test = self::_do_query_safe($sql);
if ($test < 1) {
//throw new Exception('It is not safe to do this query', 0, $sql);
$db = DB::object();
$db->currentSql = 'It is not safe to do this query';
$db->sqldebug[] = $sql;
system_error('db', $sql);
return false;
}
}
}
return true;
}
开发者ID:lqlstudio,项目名称:ttae_open,代码行数:42,代码来源:db.class.php
示例6: system_error
</tr>
<tr>
<td width="15%">PLZ</td>
<td width="85%"><input type="text" name="plz" size="30" value="' . $kunde['plz'] . '"/></td>
</tr>
<tr>
<td width="15%">Stadt</td>
<td width="85%"><input type="text" name="stadt" size="30" value="' . $kunde['stadt'] . '"/></td>
</tr>
<tr>
<td width="15%">Telefon</td>
<td width="85%"><input type="text" name="telefon" size="30" value="' . $kunde['telefon'] . '"/></td>
</tr>
<tr>
<td width="15%">Sonstiger Wunsch</td>
<td width="85%"><textarea name="wish" cols="25" rows="5"></textarea></td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="send" value="Abschicken" /></td>
</tr>
</table>
</form>';
}
} else {
system_error('Bestellsumme zu niedrig');
}
} else {
system_error('Bestellsumme nicht gesetzt');
}
?>
<hr>
开发者ID:haw-hh-ms-prg,项目名称:Pizzaservice,代码行数:31,代码来源:order.php
示例7: define
<?php
/*
* @copyright Leyun internet Technology(Shanghai)Co.,Ltd
* @license http://www.dzzoffice.com/licenses/license.txt
* @package DzzOffice
* @link http://www.dzzoffice.com
* @author zyx([email protected])
*/
define('APPTYPEID', 0);
define('CURSCRIPT', 'user');
require './core/class/class_core.php';
require libfile('class/user');
require libfile('function/user');
require libfile('function/mail');
require libfile('function/profile');
$dzz = C::app();
$modarray = array('activate', 'clearcookies', 'getpasswd', 'logging', 'lostpasswd', 'seccode', 'secqaa', 'register', 'ajax', 'regverify', 'switchstatus', 'profile', 'password', 'avatar');
$mod = !in_array($dzz->var['mod'], $modarray) && (!preg_match('/^\\w+$/', $dzz->var['mod']) || !file_exists(DZZ_ROOT . './member/member_' . $dzz->var['mod'] . '.php')) ? 'space' : $dzz->var['mod'];
define('CURMODULE', $mod);
$cachelist = array('usergroup', 'fields_register');
$dzz->cachelist = $cachelist;
$dzz->init();
include_once libfile('function/cache');
updatecache('fields_register');
if (@(!file_exists(DZZ_ROOT . './user/user_' . $mod . '.php'))) {
system_error(lang('message', 'undefined_action'));
}
require DZZ_ROOT . './user/user_' . $mod . '.php';
开发者ID:druphliu,项目名称:dzzoffice,代码行数:29,代码来源:user.php
示例8: _xss_check
function _xss_check()
{
$temp = strtoupper(urldecode(urldecode($_SERVER['REQUEST_URI'])));
if (strpos($temp, '<') !== false || strpos($temp, '"') !== false || strpos($temp, 'CONTENT-TRANSFER-ENCODING') !== false) {
system_error('request_tainting');
}
return true;
}
开发者ID:dalinhuang,项目名称:hlwbbsvincent,代码行数:8,代码来源:class_core.php
示例9: _xss_check
private function _xss_check()
{
static $check = array('"', '>', '<', '\'', 'CONTENT-TRANSFER-ENCODING');
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
$temp = $_SERVER['REQUEST_URI'];
} elseif (empty($_GET['formhash'])) {
$temp = $_SERVER['REQUEST_URI'] . file_get_contents('php://input');
} else {
$temp = '';
}
if (!empty($temp)) {
$temp = strtoupper(urldecode(urldecode($temp)));
foreach ($check as $str) {
if (strpos($temp, $str) !== false) {
system_error('request_tainting');
}
}
}
return true;
}
开发者ID:druphliu,项目名称:dzzoffice,代码行数:20,代码来源:dzz_app.php
示例10: fetch
/**
* 处理模板文件
*
* @access public
* @param string $filename
* @param sting $cache_id
*
* @return sring
*/
public function fetch($filename, $cache_id = '')
{
if (strpos($filename, '$TPLNAME') !== false) {
$filename = str_replace('$TPLNAME', TPLDIR, $filename);
$filename = str_replace('../', '', $filename);
} else {
if (strpos($filename, '../common/') !== false) {
$filename = str_replace('../', '', $filename);
$filename = str_replace('common/', ROOT_PATH . 'view/common/', $filename);
} else {
if (strpos($filename, '../common_admin/') !== false) {
$filename = str_replace('../', '', $filename);
$filename = str_replace('common_admin/', ROOT_PATH . 'view/admin/common_admin/', $filename);
} else {
if (strpos($filename, '../common_mobile/') !== false) {
$filename = str_replace('../common_mobile/', ROOT_PATH . 'view/common_mobile/', $filename);
} elseif (strpos($filename, '../') !== false) {
$filename = str_replace('../', TPLDIR . '/', $filename);
} else {
if (strpos($filename, './') !== false) {
$current_file = $this->template[0];
$filename = dirname($current_file) . '/' . str_replace('./', '', $filename);
}
}
}
}
}
if (!is_file($filename)) {
$filename = str_replace(ROOT_PATH, '', $filename);
system_error('system', $filename . ' is not extends');
}
//dump($filename);
if (!$this->_seterror) {
error_reporting(E_ALL ^ E_NOTICE);
}
$this->_seterror++;
if (strncmp($filename, 'str:', 4) == 0) {
$out = $this->_eval($this->fetch_str(substr($filename, 4)));
} else {
if ($this->_checkfile) {
if (!file_exists($filename)) {
$filename = $this->template_dir . '/' . $filename;
}
} else {
$filename = $this->template_dir . $filename;
}
if ($this->direct_output) {
$this->_current_file = $filename;
$out = $this->_eval($this->fetch_str(file_get_contents($filename)));
} else {
if ($cache_id && $this->caching) {
$out = $this->template_out;
} else {
if (!in_array($filename, $this->template)) {
$this->template[] = $filename;
}
$out = $this->make_compiled($filename);
if ($cache_id) {
$cachename = str_replace(array("/", ":"), "_", $filename) . '_' . $cache_id;
$data = serialize(array('template' => $this->template, 'expires' => $this->_nowtime + $this->cache_lifetime, 'maketime' => $this->_nowtime));
$out = str_replace("\r", '', $out);
while (strpos($out, "\n\n") !== false) {
$out = str_replace("\n\n", "\n", $out);
}
$hash_dir = $this->cache_dir . '/' . substr(md5($cachename), 0, 1);
if (!is_dir($hash_dir)) {
mkdir($hash_dir);
}
if (file_put_contents($hash_dir . '/' . $cachename . '.php', '<?php exit;?>' . $data . $out, LOCK_EX) === false) {
trigger_error('can\'t write:' . $hash_dir . '/' . $cachename . '.php');
}
$this->template = array();
}
}
}
}
$this->_seterror--;
if (!$this->_seterror) {
error_reporting($this->_errorlevel);
}
return $out;
// 返回html数据
}
开发者ID:lqlstudio,项目名称:ttae_open,代码行数:92,代码来源:SimpleSmarty.php
示例11: run
static function run()
{
global $_G;
$m = 'index';
$a = 'main';
if (CURSCRIPT == 'main') {
$m = 'index';
} elseif ($_GET['m']) {
$m = trim($_GET['m']);
} elseif (isset($_GET['fid']) && $_GET['fid'] > 0) {
$m = 'channel';
} elseif (isset($_GET['aid']) && $_GET['aid'] > 0 || isset($_GET['itemid']) && $_GET['itemid'] > 0) {
$m = 'goods';
} else {
$m = defined('IN_ADMIN') ? 'admin' : 'index';
}
$a = $_GET['a'] ? $_GET['a'] : 'main';
if (!preg_match("/^[a-z_]+\$/is", $m)) {
system_error('system', 'Module String Error');
return false;
}
if (!preg_match("/^[a-z_]+\$/is", $a)) {
system_error('system', 'Action String Error');
}
if (defined('IN_ADMIN') && !$_G[uid]) {
login();
}
$jump_url = '';
if (defined('IN_ADMIN')) {
include libfile('config/admin');
$group = $_G['group'][$_G['member']['groupid']];
foreach ($menu as $k => $v) {
$menu[$k]['select'] = 0;
if (array_key_exists($k, $group[power]) || $_G['adminid'] == 1) {
$menu[$k]['select'] = 1;
}
foreach ($v['nav'] as $k1 => $v1) {
if (array_key_exists($v1['a'], $group[power][$k]) || $_G['member']['groupid'] == 1) {
$menu[$k]['nav'][$k1]['select'] = 1;
$menu[$k]['select'] = 1;
if (!$jump_url) {
$jump_url = 'm=' . $k . '&a=' . $v1['a'];
}
} else {
$menu[$k]['nav'][$k1]['select'] = 0;
}
}
}
$_G['menu'] = $menu;
seo('uz-system 后台管理 power by uz-system.com');
include_once ROOT_PATH . "inc/admin_action/" . $m . ".action.php";
} else {
include_once libfile("action/" . $m);
}
if ($m == 'list') {
$mm = '_' . $m;
if (!class_exists($mm)) {
system_error('system', 'Module not exists');
}
$class = new $mm();
} else {
if (!class_exists($m)) {
system_error('system', 'Module not exists');
}
$class = new $m();
}
define('CURMODULE', $m);
if (defined('IN_ADMIN') && $_G[uid] && $_G[member][groupid] != 1) {
$group = $_G['group'][$_G['member']['groupid']];
$gid = $_G['member']['groupid'];
$power = $_G['group'][$gid]['power'];
$power['login']['logout'] = 1;
//验证登录进后入台权限
if ($_G[group][$gid]['login_admin'] != 1) {
logout();
_header("Location:" . CURSCRIPT . ".php");
//system_error('system','您当前用户组无权进入后台');
}
//验证后台模块权限
if (!$power[$m]) {
if ($m == 'admin' && $a == 'main' && $_G['member']['groupid'] != 1 && $jump_url) {
header("Location:" . URL . $jump_url);
echo '<script type="text/javascript">window.location.href = "' . URL . $jump_url . '";</script>';
exit;
} else {
cpmsg('当前模块您无法进行操作', 'errr', $jump_url);
}
}
if ($a == 'del' && $power[$m]['post'] == 1) {
} else {
if ($power[$m][$a] != 1) {
cpmsg('当前模块分类您无法进行操作', 'errr', $jump_url);
}
}
}
if ($a == 'list') {
$a = '_list';
}
if (method_exists($class, $a)) {
if ($a == '_list') {
//.........这里部分代码省略.........
开发者ID:lqlstudio,项目名称:ttae_open,代码行数:101,代码来源:application.class.php
示例12: define
// define preset data
// -------------------------------------------------
// preset data path
define('PRESET_PATH', makepath(array(ABS_PATH, 'applications', 'preset')));
// -------------------------------------------------
// connect to database
// -------------------------------------------------
setConnectionName('default');
setConnectionConf(config('mysql'));
// -------------------------------------------------
// run system
// -------------------------------------------------
if (version_compare(PHP_VERSION, '5.3') == -1) {
$err = 'The current PHP version ' . PHP_VERSION . ' is not supported.' . PHP_EOL;
$err .= 'Please upgrade your PHP installation to 5.3 or later.';
system_error($err);
} else {
// create front controller object
$FrontController = new FrontController();
// create registry object as singleton
$Registry = Singleton::getInstance('Registry');
$Cookie = Singleton::getInstance('Cookie');
if (!$Cookie->isCookie('langcode')) {
$Cookie->set('langcode', tellme('langcode', 'DE'));
}
$Request = new HTTP_Request();
$Response = new HTTP_Response();
$Registry->set('HttpRequest', $Request);
$Registry->set('HttpResponse', $Response);
// handle request
$obj = $FrontController->handleRequest($Request, $Response);
开发者ID:dlehmann,项目名称:DevCE,代码行数:31,代码来源:bootstrap.php
示例13: getAll
/**
* 获取整个数据集
* @param string $sql SQL语句
* @param integer $primaryKey 如果有指定$primaryKey的值,则使用该字段的值做为数组的一维的键值
* @param integer $type 返回值类型,可选为MYSQL_ASSOC|MYSQL_NUM|MYSQL_BOTH|MSSQL_ASSOC|MSSQL_NUM|MSSQL_BOTH
* @param string $convertInt 表名称,如果不为空,则根据表结构转换相关的整型,否则不处理
* @return array 二维数组
*/
public function getAll($sql, $primaryKey = '', $type = MYSQL_ASSOC, $convertInt = '', $isKV = false)
{
$this->query($sql);
if ($this->errorInfo()) {
system_error('system', $this->errorInfo());
return false;
}
if ($primaryKey == '') {
$return = $this->queryResult->fetchAll($this->mapType($type));
return $return;
}
$return = array();
while ($row = $this->fetchRow($type)) {
if ($convertInt) {
foreach ($row as $k => &$v) {
if ($v == 'null') {
$v = '';
}
if (strpos($fieldList[$k]['Type'], 'int(') !== false) {
$v = intval($v);
}
}
}
if ($isKV) {
@($return[$row[$primaryKey]] = $row[0]);
} else {
@($return[$row[$primaryKey]] = $row);
}
}
return $return;
}
开发者ID:lqlstudio,项目名称:ttae_open,代码行数:39,代码来源:database.class.php
示例14: error_handler
function error_handler($errorType, $errorMsg, $errorFile, $errorLine)
{
$error_types = array(1, 4, 16, 64, 256);
if (in_array($errorType, $error_types)) {
$msg = "Run Error: " . $errorType . "<br/>MSG: " . $errorMsg . "<br/>File: " . $errorFile . "<br/>Line: " . $errorLine;
system_error('system', $msg);
// throw new Exception($errorMsg, 0, $errorType, $errorFile, $errorLine);
}
}
开发者ID:lqlstudio,项目名称:ttae_open,代码行数:9,代码来源:core.function.php
示例15: trigger_elgg_event
*/
$user->save();
if ($user->issimpleuser == 'no') {
$user->name = $title;
}
// Notify of profile update
trigger_elgg_event('profileupdate', $user->type, $user);
//add to river
add_to_river('river/user/default/profileupdate', 'update', $_SESSION['user']->guid, $_SESSION['user']->guid);
//system_message(elgg_echo("profile:saved").$user->guid.$malakia);
system_message(elgg_echo("profile:saved") . $ur . $user->guid);
// Forward to the user's profile
// forward($user->getUrl());
// print_r(page_owner_entity()->parentdescs);
// print_r(page_owner_entity()->parentits);
// print_r(page_owner_entity()->parentidents);
// print_r(page_owner_entity()->parenttypes);
// exit();
if ($user->issimpleuser == 'no') {
//{echo "NIKOLAS"; print_r($user->name_meducator20); echo "<br />";print_r($user->affil_meducator20); echo "<br />";print_r($user->foaf_meducator20); exit();}
// echo "i am here";
$isAnUpdate = get_input("isAnUpdate");
forward("http://metamorphosis.med.duth.gr/mod/content_item/createrdf.php?id=" . $user->guid . "&update=" . $isAnUpdate);
} else {
forward($user->getUrl());
}
} else {
// If we can't, display an error
system_error(elgg_echo("profile:cantedit"));
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:30,代码来源:edit.php
示例16: get_input
<?php
$guid = get_input('guid');
if ($guid) {
$entity = get_entity($guid);
}
elgg_push_context('news');
elgg_set_page_owner_guid($entity->guid);
if (!$entity) {
system_error(elgg_echo('news:could_not_find'));
forward(REFERER);
}
if ($entity->canEdit()) {
elgg_register_title_button('news', 'edit');
}
$title = $entity->title;
$body = elgg_view_layout('content', array('title' => '', 'filter' => '', 'content' => elgg_view_entity($entity, array('full_view' => true))));
echo elgg_view_page($title, $body, "default", array('leader' => elgg_view('news/header', array('entity' => $entity))));
开发者ID:pleio,项目名称:news,代码行数:18,代码来源:view.php
示例17: I
//签名验证
return;
$getArr = I('get.');
if (!$getArr) {
return;
}
$sign = isset($getArr['sign']) ? $getArr['sign'] : system_error("not_fonud_sign");
unset($getArr['sign']);
ksort($getArr);
$signstr = "";
foreach ($getArr as $k => $v) {
$signstr .= $k . "=" . urlencode($v) . "&";
}
$signstr = rtrim($signstr, "&");
if (md5($signstr) != $sign) {
system_error("sign_error");
}
});
\think\Hook::add('action_begin', function () {
//ssid 认证
$getArr = I('get.');
if (!$getArr) {
return;
}
if (isset($getArr['ssid'])) {
$ssid = $getArr['ssid'];
} else {
return;
}
if (!S("ssid_" . $ssid)) {
return;
开发者ID:LoveOyy,项目名称:woaini,代码行数:31,代码来源:common.php
示例18: elgg_echo
$user->nValorations = 0;
$user->expertise = 0;
//system_message($user->nValorations . " reset " . $user->username);
$user->karma = elgg_echo('hflts:karma:none');
/* hard core erasing is plausible too
$prefix = elgg_get_config('dbprefix');
delete_data("DELETE from {$prefix}metadata where name_id=" . add_metastring('userpoints_points'));
*/
}
}
/*
* Borrar evaluaciones
*/
$list = elgg_get_entities_from_metadata(['type' => 'object', 'subtype' => 'evaluation_content', 'order_by_metadata' => ['name' => 'state', 'direction' => 'ASC', 'as' => 'text']]);
if (!is_array($list)) {
system_error("Revisar foreach de E.C.Reset");
}
foreach ($list as $evaluation) {
/*
* se reinician los valores del perfil del usuario evaluado
* se limpia el viaje de valoraciones
* se borra la valoración en sí
*/
$user = get_user($evaluation->user_guid);
if (!elgg_trigger_plugin_hook('evaluationcontent:delete', 'system', array('evaluation' => $evaluation), true)) {
register_error(elgg_echo("evaluationcontent:notdeleted"));
}
$theTrip = get_entity($evaluation->trip);
if ($theTrip) {
//el viaje existe
unset($theTrip->grade);
开发者ID:rosanamontes,项目名称:teranga.go,代码行数:31,代码来源:reset.php
示例19: get_input
<?php
/**
* Claim a question (by e-mail link).
*
* @package Questions
*
*/
$guid = (int) get_input('guid');
$question = get_entity($guid);
if (!elgg_is_logged_in()) {
$_SESSION['last_forward_from'] = current_page_url();
forward('/login');
}
if (!$question instanceof ElggQuestion) {
register_error(elgg_echo("ClassException:ClassnameNotClass", array($guid, elgg_echo("item:object:question"))));
forward(REFERER);
}
if (!$question->canEdit()) {
register_error(elgg_echo("InvalidParameterException:NoEntityFound"));
forward(REFERER);
}
if (!$question->workflowManager) {
$question->workflowManager = elgg_get_logged_in_user_guid();
$question->save();
system_message(elgg_echo("questions:workflow:claim:success"));
} else {
system_error(elgg_echo("questions:workflow:claim:failed"));
}
forward($question->getWorkflowURL());
开发者ID:Pleio,项目名称:questions,代码行数:30,代码来源:workflow_claim.php
示例20: function
* Licence: CC-ByNCSA
* Reference: Microproyecto CEI BioTIC Ref. 11-2015
* Project coordinator: @rosanamontes
* Website: http://lsi.ugr.es/rosana
*
* File: Save the plugin settings
*/
$fail = function () use($url) {
register_error(elgg_echo('hflts:settings:fail'));
forward($url);
};
// clear the method list of previous settings
$list = elgg_get_entities_from_metadata(['type' => 'object', 'subtype' => 'mcdm']);
if ($list) {
if (!is_array($list)) {
system_error("Revisar foreach de settings");
}
foreach ($list as $old_object) {
if (!$old_object->delete()) {
$fail();
}
}
}
$simple_settings = ['auto_moderation', 'weight_assessments', 'weight_experts', 'base_expertise', 'allowMany', 'debug', 'profile_display', 'termset', 'classic', 'todim', 'vikor', 'topsis', 'electre', 'promethee', 'aggOperator', 'exportTex'];
foreach ($simple_settings as $setting) {
elgg_set_plugin_setting($setting, get_input($setting), 'hflts');
}
$aggOperator = elgg_get_plugin_setting('aggOperator', 'hflts');
switch ($aggOperator) {
case '0':
$operator = elgg_echo('hflts:aggOperator:minmax');
开发者ID:rosanamontes,项目名称:teranga.go,代码行数:31,代码来源:settings.php
注:本文中的system_error函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论