当前位置: 首页>>代码示例>>PHP>>正文


PHP cpmessage函数代码示例

本文整理汇总了PHP中cpmessage函数的典型用法代码示例。如果您正苦于以下问题:PHP cpmessage函数的具体用法?PHP cpmessage怎么用?PHP cpmessage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了cpmessage函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: eventclass_cache

    include_once S_ROOT . "source/function_cache.php";
    eventclass_cache();
    cpmessage("do_success", "admincp.php?ac=eventclass", 2);
}
if ("delete" == $_GET['op']) {
    //  delete  event  category
    if (empty($thevalue)) {
        cpmessage("there_is_no_designated_users_columns", "admincp?ac=eventclass", 2);
    }
    if (!@(include_once S_ROOT . "data/data_eventclass.php")) {
        include_once S_ROOT . "source/function_cache.php";
        eventclass_cache();
    }
    $list = $_SGLOBAL['eventclass'];
    if (sizeof($list) == 1) {
        // Can not delete a single category
        cpmessage("have_no_eventclass", "admincp.php?ac=eventclass", 2);
        // delete Failed, leave at least one event category
    }
    $list[$thevalue['classid']] = null;
    // Remove the deleted entry
} elseif ("add" == $_GET['op']) {
    //$thevalue['poster'] = "image/event/default.jpg";
} else {
    if (!@(include_once S_ROOT . './data/data_eventclass.php')) {
        include_once S_ROOT . 'source/function_cache.php';
        eventclass_cache();
    }
    $list = $_SGLOBAL['eventclass'];
    $actives = array('view' => ' class="active"');
}
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:admincp_eventclass.php

示例2: exit

if (!defined('iBUAA') || !defined('IN_ADMINCP')) {
    exit('Access Denied');
}
//权限
if (!($allowmanage = checkperm('manageshare'))) {
    $_GET['uid'] = $_SGLOBAL['supe_uid'];
    //只能操作本人的
    $_GET['username'] = '';
}
if (submitcheck('batchsubmit')) {
    include_once S_ROOT . './source/function_delete.php';
    if (!empty($_POST['ids']) && deleteshares($_POST['ids'])) {
        cpmessage('do_success', $_POST['mpurl']);
    } else {
        cpmessage('please_delete_the_correct_choice_to_share', $_POST['mpurl']);
    }
}
$mpurl = 'admincp.php?ac=share';
//处理搜索
$intkeys = array('uid', 'sid');
$strkeys = array('username', 'type');
$randkeys = array(array('sstrtotime', 'dateline'), array('intval', 'hot'));
$likekeys = array();
$results = getwheres($intkeys, $strkeys, $randkeys, $likekeys);
$wherearr = $results['wherearr'];
$wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr);
$mpurl .= '&' . implode('&', $results['urls']);
//排序
$orders = getorders(array('dateline', 'hot'), 'sid');
$ordersql = $orders['sql'];
开发者ID:shiyake,项目名称:php-ihome,代码行数:30,代码来源:admincp_share.php

示例3: ssetcookie

            if ($_SERVER['REQUEST_METHOD'] == 'GET') {
                ssetcookie('_refer', rawurlencode($_SERVER['REQUEST_URI']));
            } else {
                ssetcookie('_refer', rawurlencode('admincp.php?ac=' . $_GET['ac']));
            }
            $actives = array('advance' => ' class="active"');
            include template('cp_advance');
            exit;
        }
        break;
    case '2':
        //登录成功
        break;
    default:
        //尝试次数太多禁止登录
        cpmessage('excessive_number_of_attempts_to_sign');
        break;
}
if ($ac == 'defaultuser') {
    $acfile = 'hotuser';
} else {
    $acfile = $ac;
}
//取消翻页限制
$_SCONFIG['maxpage'] = 0;
//log
if ($needlogin) {
    admincp_log();
}
//去掉广告
$_SGLOBAL['ad'] = array();
开发者ID:AlexChien,项目名称:ey_uhome,代码行数:31,代码来源:admincp.php

示例4: array

            $setarr = array('tagname' => $_POST['newtagname'], 'uid' => $_SGLOBAL['supe_uid'], 'dateline' => $_SGLOBAL['timestamp']);
            $newtagid = inserttable('tag', $setarr, 1);
        }
        //ʼϲ
        include_once S_ROOT . './source/function_op.php';
        if (!empty($_POST['ids']) && mergetag($_POST['ids'], $newtagid)) {
            cpmessage('do_success', $_POST['mpurl']);
        } else {
            cpmessage('the_tag_choose_to_merge', $_POST['mpurl']);
        }
    } elseif ($_POST['optype'] == 'close' || $_POST['optype'] == 'open') {
        include_once S_ROOT . './source/function_op.php';
        if (!empty($_POST['ids']) && closetag($_POST['ids'], $_POST['optype'])) {
            cpmessage('do_success', $_POST['mpurl']);
        } else {
            cpmessage('choose_to_operate_tag', $_POST['mpurl']);
        }
    }
}
$mpurl = 'admincp.php?ac=tag';
// Search Processing
$intkeys = array('close');
$strkeys = array();
$randkeys = array(array('sstrtotime', 'dateline'), array('intval', 'blognum'));
$likekeys = array('tagname');
$results = getwheres($intkeys, $strkeys, $randkeys, $likekeys);
$wherearr = $results['wherearr'];
$wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr);
$mpurl .= '&' . implode('&', $results['urls']);
// sort
$orders = getorders(array('dateline', 'blognum'), 'tagid');
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:admincp_tag.php

示例5: cpmessage

    cpmessage("do_success", "admincp.php?ac=jifen_lp", 2);
}
if ("delete" == $_GET['op']) {
    // 删除礼品
    if (!$_GET['id']) {
        cpmessage("请至少正确选择一个要删除的礼品", "admincp.php?ac=jifen_lp", 2);
        //请至少正确选择一个要删除的礼品
    }
    $_GET['id '] = intval($_GET['id']);
    $_SGLOBAL['db']->query("DELETE FROM " . tname("jifen_lp") . " WHERE id = '{$_GET['id']}'");
    $count = $_SGLOBAL['db']->result($_SGLOBAL['db']->query("SELECT COUNT(*) FROM " . tname('jifen_lp') . " where lbid=" . intval($_GET['lbid']) . " group by lbid"), 0);
    updatetable('jifen_lb', array('nums' => $count), array('id' => intval($_GET['lbid'])));
    // 更新缓存
    include_once S_ROOT . "source/function_cache.php";
    jifen_lb_cache();
    cpmessage("do_success", "admincp.php?ac=jifen_lp", 2);
} elseif ("add" == $_GET['op']) {
    //$thevalue['poster'] = "image/event/default.jpg";
} else {
    $mpurl = 'admincp.php?ac=' . $ac;
    $orderby = array($_GET['orderby'] => ' selected');
    $ordersc = array($_GET['ordersc'] => ' selected');
    $wheresql = ' id > 0';
    if ($_GET['name']) {
        $wheresql .= " and name like '%" . $_GET['name'] . "%'";
    }
    if ($_GET['des']) {
        $wheresql .= " and des like '%" . $_GET['des'] . "%'";
    }
    $ordersql = '';
    if ($_GET['orderby']) {
开发者ID:shiyake,项目名称:php-ihome,代码行数:31,代码来源:admincp_jifen_lp.php

示例6: elseif

		$_SGLOBAL['db']->query("DELETE FROM ".tname('usergroup')." WHERE gid='$_GET[gid]'");

		groupcredit_update();
		
	} elseif($thevalue['system'] == '1') {
		//删除
		$_SGLOBAL['db']->query("DELETE FROM ".tname('usergroup')." WHERE gid='$_GET[gid]'");
	} else {
		cpmessage('system_user_group_could_not_be_deleted');
	}

	//更新用户权限
	updatetable('space', array('groupid'=>0), array('groupid'=>$_GET['gid']));

	//更新缓存
	include_once(S_ROOT.'./source/function_cache.php');
	usergroup_cache();

	cpmessage('do_success', 'admincp.php?ac=usergroup');
}

function groupcredit_update() {
	global $_SGLOBAL;
	
	//起始为-999999999
	$lowergid = $_SGLOBAL['db']->result($_SGLOBAL['db']->query("SELECT gid FROM ".tname('usergroup')." WHERE system='0' ORDER BY explower LIMIT 1"), 0);
	if($lowergid) updatetable('usergroup', array('explower'=>'-999999999'), array('gid'=>$lowergid));

}

?>
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:admincp_usergroup.php

示例7: array

    //添加
    $thevalue = array('filedid' => 0, 'formtype' => 'text');
    $formtypearr = array();
} elseif ($_GET['op'] == 'edit') {
    $formtypearr = array($thevalue['formtype'] => ' selected');
} elseif ($_GET['op'] == 'delete') {
    $_GET['fieldid'] = intval($_GET['fieldid']);
    //至少保留一个栏目
    if (count($_SGLOBAL['profield']) < 2) {
        cpmessage('have_one_mtag');
    }
    if (submitcheck('deletesubmit')) {
        $newfieldid = intval($_POST['newfieldid']);
        if (empty($_SGLOBAL['profield'][$newfieldid])) {
            cpmessage('there_is_no_designated_users_columns');
        }
        include_once S_ROOT . './source/function_delete.php';
        if ($_GET['fieldid'] && deleteprofield(array($_GET['fieldid']), $newfieldid)) {
            //更新缓存
            include_once S_ROOT . './source/function_cache.php';
            profield_cache();
            cpmessage('do_success', 'admincp.php?ac=profield');
        } else {
            cpmessage('choose_to_delete_the_columns', 'admincp.php?ac=profield');
        }
    }
    $newfield = $_SGLOBAL['profield'];
    if (isset($newfield[$_GET['fieldid']])) {
        unset($newfield[$_GET['fieldid']]);
    }
}
开发者ID:NaturalWill,项目名称:UCQA,代码行数:31,代码来源:admincp_profield.php

示例8: exit

<?php

if (!defined('iBUAA') || !defined('IN_ADMINCP')) {
    exit('Access Denied');
}
$tagid = empty($_GET['tagid']) ? 0 : intval($_GET['tagid']);
if (submitcheck('deletesubmit')) {
    include_once S_ROOT . './source/function_delete.php';
    if (!empty($_POST['ids']) && deleteposts($tagid, $_POST['ids'])) {
        cpmessage('do_success', $_POST['mpurl']);
    } else {
        cpmessage('choose_to_delete_the_topic', $_POST['mpurl']);
    }
}
//权限
$managebatch = checkperm('managebatch');
$allowbatch = true;
$allowmanage = 0;
if (checkperm('managethread')) {
    $allowmanage = 1;
} else {
    //群主
    if ($tagid) {
        $grade = getcount('tagspace', array('tagid' => $tagid, 'uid' => $_SGLOBAL['supe_uid']), 'grade');
        if ($grade >= 8) {
            //是否成员
            $allowmanage = 1;
            $managebatch = 1;
        }
    }
}
开发者ID:shiyake,项目名称:php-ihome,代码行数:31,代码来源:admincp_post.php

示例9: data_set

            $datas['question'][] = $value;
            $datas['answer'][] = $a_value;
        }
    }
    if (empty($datas['question']) && $_POST['config']['questionmode']) {
        $_POST['config']['questionmode'] = 0;
    }
    data_set('spam', $datas);
    $setarr = array();
    foreach ($_POST['config'] as $var => $value) {
        $value = trim($value);
        $setarr[] = "('{$var}', '{$value}')";
    }
    if ($setarr) {
        $_SGLOBAL['db']->query("REPLACE INTO " . tname('config') . " (var, datavalue) VALUES " . implode(',', $setarr));
    }
    //更新缓存
    include_once S_ROOT . './source/function_cache.php';
    config_cache();
    cpmessage('do_success', 'admincp.php?ac=spam');
}
$configs = array();
$query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('config'));
while ($value = $_SGLOBAL['db']->fetch_array($query)) {
    $configs[$value['var']] = shtmlspecialchars($value['datavalue']);
}
$datas = data_get('spam');
if ($datas) {
    $datas = unserialize($datas);
}
$onlineip = getonlineip();
开发者ID:shiyake,项目名称:php-ihome,代码行数:31,代码来源:admincp_spam.php

示例10: verifyevents

function verifyevents($eventids, $grade)
{
    global $_SGLOBAL;
    $allowmanage = checkperm('manageevent');
    $managebatch = checkperm('managebatch');
    $opnum = 0;
    $eventarr = array();
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname("event") . " WHERE eventid IN (" . simplode($eventids) . ")");
    while ($value = $_SGLOBAL['db']->fetch_array($query)) {
        if ($allowmanage && !$managebatch) {
            $opnum++;
        }
    }
    if (!$allowmanage || !$managebatch && $opnum > 1) {
        return array();
    }
    $grade = intval($grade);
    if (!in_array($grade, array(-2, -1, 1, 2))) {
        cpmessage('bad_event_grade');
        // 错误的活动状态
    }
    $newids = $events = $actions = array();
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('event') . " WHERE eventid IN (" . simplode($eventids) . ")");
    while ($value = $_SGLOBAL['db']->fetch_array($query)) {
        if ($grade == $value['grade']) {
            continue;
        }
        $newids[] = $value['eventid'];
        $events[$value['eventid']] = $value;
        if ($grade == -1) {
            $actions[$value['eventid']] = "unverify";
            //未通过审核
        } elseif ($grade == 1) {
            if ($value['grade'] == -2) {
                $actions[$value['eventid']] = "open";
                // 开启
            } elseif ($value['grade'] < 1) {
                $actions[$value['eventid']] = "verify";
                // 通过审核
            } elseif ($value['grade'] == 2) {
                $actions[$value['eventid']] = "unrecommend";
                // 取消推荐
            }
        } elseif ($grade == 2) {
            //推荐奖励积分
            getreward('recommendevent', 1, $value['uid'], '', 0);
            $actions[$value['eventid']] = "recommend";
            //推荐
        } elseif ($grade == -2) {
            $actions[$value['eventid']] = "close";
            //关闭
        }
    }
    if (empty($newids)) {
        return array();
    }
    @(include_once S_ROOT . './data/data_eventclass.php');
    $noteids = $note_inserts = array();
    $feed_inserts = array();
    foreach ($newids as $id) {
        $event = $events[$id];
        if ($grade >= 1 && $events[$id]['grade'] < 1 && $events[$id]['grade'] >= -1) {
            // feed:发布活动
            $poster = "";
            if (empty($event['poster'])) {
                $poster = $_SGLOBAL['eventclass'][$event['classid']]['poster'];
            } else {
                $poster = pic_get($event['poster'], $event['thumb'], $event['remote']);
            }
            $feedarr = array('appid' => UC_APPID, 'icon' => 'event', 'uid' => $event['uid'], 'username' => $event['username'], 'dateline' => $_SGLOBAL['timestamp'], 'title_template' => cplang('event_add'), 'title_data' => array('eventid' => $id, 'title' => $event['title']), 'body_template' => cplang('event_feed_info'), 'body_data' => array("eventid" => $id, "title" => $event['title'], "username" => $event['username'], 'starttime' => sgmdate('m-d H:i', $event['starttime']), 'endtime' => sgmdate('m-d H:i', $event['endtime']), 'province' => $event['province'], 'city' => $event['city'], 'location' => $event['location']), 'body_general' => '', 'image_1' => $poster, 'image_1_link' => 'space.php?do=event&id=' . $id, 'image_2' => '', 'image_2_link' => '', 'image_3' => '', 'image_3_link' => '', 'image_4' => '', 'image_4_link' => '', 'target_ids' => '', 'friend' => '');
            $feedarr = sstripslashes($feedarr);
            //去掉转义
            $feedarr['title_data'] = serialize(sstripslashes($feedarr['title_data']));
            //数组转化
            $feedarr['body_data'] = serialize(sstripslashes($feedarr['body_data']));
            //数组转化
            $feedarr['hash_template'] = md5($feedarr['title_template'] . "\t" . $feedarr['body_template']);
            //喜好hash
            $feedarr['hash_data'] = md5($feedarr['title_template'] . "\t" . $feedarr['title_data'] . "\t" . $feedarr['body_template'] . "\t" . $feedarr['body_data']);
            //合并hash
            $feedarr = saddslashes($feedarr);
            //增加转义
            $feed_inserts[] = "('{$feedarr['appid']}', 'event', '{$feedarr['uid']}', '{$feedarr['username']}', '{$feedarr['dateline']}', '0', '{$feedarr['hash_template']}', '{$feedarr['hash_data']}', '{$feedarr['title_template']}', '{$feedarr['title_data']}', '{$feedarr['body_template']}', '{$feedarr['body_data']}', '{$feedarr['body_general']}', '{$feedarr['image_1']}', '{$feedarr['image_1_link']}', '{$feedarr['image_2']}', '{$feedarr['image_2_link']}', '{$feedarr['image_3']}', '{$feedarr['image_3_link']}', '{$feedarr['image_4']}', '{$feedarr['image_4_link']}', '', '{$id}', 'eventid')";
        }
        if ($event['uid'] != $_SGLOBAL['supe_uid']) {
            // 自己的不发送通知
            $noteids[] = $event[uid];
            $note_msg = cplang('event_set_' . $actions[$id], array("space.php?do=event&id=" . $event['eventid'], $event['title']));
            $note_inserts[] = "('{$event['uid']}', 'system', '1', '0', '', '" . addslashes($note_msg) . "', '{$_SGLOBAL['timestamp']}')";
        }
    }
    unset($events);
    //修改状态
    if ($grade == 2) {
        // 需要同时修改推荐时间
        $_SGLOBAL['db']->query("UPDATE " . tname("event") . " SET grade='{$grade}', recommendtime='{$_SGLOBAL['timestamp']}' WHERE eventid IN (" . simplode($newids) . ")");
    } else {
        $_SGLOBAL['db']->query("UPDATE " . tname("event") . " SET grade='{$grade}' WHERE eventid IN (" . simplode($newids) . ")");
    }
    //通知
//.........这里部分代码省略.........
开发者ID:NaturalWill,项目名称:UCQA,代码行数:101,代码来源:admincp_event.php

示例11: cpmessage

    cpmessage('do_success', 'admincp.php?ac=task');
}
if ($_GET['op'] == 'edit') {
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('task') . " WHERE taskid='{$taskid}'");
    if ($thevalue = $_SGLOBAL['db']->fetch_array($query)) {
        $thevalue['starttime'] = $thevalue['starttime'] ? sgmdate('Y-m-d H:i:s', $thevalue['starttime']) : '';
        $thevalue['endtime'] = $thevalue['endtime'] ? sgmdate('Y-m-d H:i:s', $thevalue['endtime']) : '';
    }
} elseif ($_GET['op'] == 'add') {
    $thevalue = array('taskid' => 0, 'available' => 1, 'nexttime' => 0, 'credit' => 0);
} elseif ($_GET['op'] == 'delete') {
    $_SGLOBAL['db']->query("DELETE FROM " . tname('task') . " WHERE taskid='{$taskid}'");
    $_SGLOBAL['db']->query("DELETE FROM " . tname('usertask') . " WHERE taskid='{$taskid}'");
    // Update Cache
    include_once S_ROOT . './source/function_cache.php';
    task_cache();
    cpmessage('do_success', 'admincp.php?ac=task');
} else {
    // list
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('task') . " ORDER BY displayorder");
    while ($task = $_SGLOBAL['db']->fetch_array($query)) {
        $task['starttime'] = $task['starttime'] ? sgmdate("Y-m-d H:i:s", $task['starttime']) : 'N/A';
        $task['endtime'] = $task['endtime'] ? sgmdate("Y-m-d H:i:s", $task['endtime']) : 'N/A';
        $task['image'] = empty($task['image']) ? 'image/task.gif' : $task['image'];
        $list[] = $task;
    }
    $actives = array('view' => ' class="active"');
}
$nexttypearr = array($thevalue['nexttype'] => ' selected');
$nextimestyle = $thevalue['nexttype'] == 'time' ? '' : 'none';
$availables = array($thevalue['available'] => ' checked');
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:admincp_task.php

示例12: exit

/*
	[UCenter Home] (C) 2007-2008 Comsenz Inc.
	$Id: admincp_credit.php 8390 2008-08-06 05:50:42Z liguode $
*/
if (!defined('IN_UCHOME') || !defined('IN_ADMINCP')) {
    exit('Access Denied');
}
//х╗оч
if (!checkperm('managecredit')) {
    cpmessage('no_authority_management_operation');
}
if (submitcheck('creditsubmit')) {
    $ins = array();
    foreach ($_POST['get'] as $key => $value) {
        $ins['get'][$key] = abs(intval($value));
    }
    foreach ($_POST['pay'] as $key => $value) {
        $ins['pay'][$key] = abs(intval($value));
    }
    data_set('creditrule', $ins);
    include_once S_ROOT . './source/function_cache.php';
    creditrule_cache();
    cpmessage('do_success', 'admincp.php?ac=credit');
}
@(include_once S_ROOT . './data/data_creditrule.php');
if (empty($_SGLOBAL['creditrule'])) {
    $get = $pay = array();
} else {
    $get = $_SGLOBAL['creditrule']['get'];
    $pay = $_SGLOBAL['creditrule']['pay'];
}
开发者ID:xiaoxiaoleo,项目名称:ngintek,代码行数:31,代码来源:admincp_credit.php

示例13: exit

	$Id: admincp_pic.php 12568 2009-07-08 07:38:01Z zhengqingpeng $
*/
if (!defined('IN_UCHOME') || !defined('IN_ADMINCP')) {
    exit('Access Denied');
}
// Check Permissions
if (!($allowmanage = checkperm('managealbum'))) {
    $_GET['uid'] = $_SGLOBAL['supe_uid'];
    // For Admin Only
}
if (submitcheck('batchsubmit')) {
    include_once S_ROOT . './source/function_delete.php';
    if (!empty($_POST['ids']) && deletepics($_POST['ids'])) {
        cpmessage('do_success', $_POST['mpurl']);
    } else {
        cpmessage('choose_to_delete_pictures', $_POST['mpurl']);
    }
}
$mpurl = 'admincp.php?ac=pic';
// process the user name
if ($_GET['username']) {
    $query = $_SGLOBAL['db']->query("SELECT uid FROM " . tname('space') . " WHERE username='{$_GET['username']}'");
    if ($value = $_SGLOBAL['db']->fetch_array($query)) {
        $_GET['uid'] = $value['uid'];
    }
}
// Search Processing
$intkeys = array('albumid', 'uid', 'picid');
$strkeys = array('postip');
$randkeys = array(array('sstrtotime', 'dateline'), array('intval', 'hot'));
$likekeys = array('filename', 'title');
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:admincp_pic.php

示例14: trim

        $setarr['image_2_link'] = trim($_POST['image_2_link']);
        $setarr['image_3'] = trim($_POST['image_3']);
        $setarr['image_3_link'] = trim($_POST['image_3_link']);
        $setarr['image_4'] = trim($_POST['image_4']);
        $setarr['image_4_link'] = trim($_POST['image_4_link']);
        $setarr['dateline'] = $_SGLOBAL['timestamp'];
        updatetable('feed', $setarr, array('feedid' => $feedid, 'uid' => 0));
    }
    cpmessage('do_success', 'admincp.php?ac=sitefeed', 0);
} elseif (submitcheck('deletesubmit')) {
    if ($_POST['ids']) {
        $_SGLOBAL['usergroup'][$space['groupid']]['managefeed'] = 1;
        include_once S_ROOT . './source/function_delete.php';
        deletefeeds($_POST['ids']);
    }
    cpmessage('do_success', 'admincp.php?ac=sitefeed', 0);
}
if ($_GET['op'] == 'add') {
    $feed = array();
    $feed['dateline'] = sgmdate('Y-m-d H:i', $_SGLOBAL['timestamp']);
} elseif ($_GET['op'] == 'edit') {
    $_GET['feedid'] = intval($_GET['feedid']);
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('feed') . " WHERE uid='0' AND feedid='{$_GET['feedid']}'");
    $feed = $_SGLOBAL['db']->fetch_array($query);
    $feed = shtmlspecialchars($feed);
    if ($feed['dateline'] < $_SGLOBAL['timestamp']) {
        $feed['dateline'] = $_SGLOBAL['timestamp'];
    }
    $feed['dateline'] = sgmdate('Y-m-d H:i', $feed['dateline']);
} else {
    //浏览
开发者ID:xiaoxiaoleo,项目名称:ngintek,代码行数:31,代码来源:admincp_sitefeed.php

示例15: while

    while ($value = $_SGLOBAL['db']->fetch_array($query)) {
        $list[] = $value;
    }
} elseif ($_GET['op'] == 'add') {
    $click = array();
} elseif ($_GET['op'] == 'delete') {
    //ɾ³ý
    if ($click) {
        //ɾ³ý×Ö¶Î
        //Ôö¼Ó×Ö¶Î
        switch ($click['idtype']) {
            case 'picid':
                $tablename = tname('pic');
                break;
            case 'tid':
                $tablename = tname('thread');
                break;
            default:
                $tablename = tname('blog');
                break;
        }
        $_SGLOBAL['db']->query("ALTER TABLE {$tablename} DROP click_{$clickid}", 'SILENT');
        $_SGLOBAL['db']->query("DELETE FROM " . tname('click') . " WHERE clickid='{$clickid}'");
        $_SGLOBAL['db']->query("DELETE FROM " . tname('clickuser') . " WHERE clickid='{$clickid}'");
        //¸üлº´æ
        include_once S_ROOT . './source/function_cache.php';
        click_cache();
    }
    cpmessage('do_success', 'admincp.php?ac=click');
}
$idtypearr = $click ? array($click['idtype'] => ' selected') : array();
开发者ID:shiyake,项目名称:php-ihome,代码行数:31,代码来源:admincp_click.php


注:本文中的cpmessage函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。