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


PHP getmodelinfoall函数代码示例

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


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

示例1: get_groupby_user_attr

 function get_groupby_user_attr()
 {
     $attr = array();
     include_once B_ROOT . './source/function/cache.func.php';
     //讀入緩存
     $mname = 'shop';
     $cacheinfo = getmodelinfoall('modelname', 'groupbuy');
     if (!empty($cacheinfo['columns'])) {
         foreach ($cacheinfo['columns'] as $column) {
             if ($column['allowpost'] == 1 && preg_match('/^user_/', $column['fieldname'])) {
                 $attr[] = $column;
             }
         }
     }
     return $attr;
 }
开发者ID:pan289091315,项目名称:Discuz,代码行数:16,代码来源:attr.class.php

示例2: block_model


//.........这里部分代码省略.........
            if (!empty($scopequery)) {
                $wherearr[] = $scopequery;
            }
        }
        if (!empty($wherearr)) {
            $sql['where'] = 'WHERE ' . implode(' AND ', $wherearr);
        }
        //order
        if (!empty($paramarr['order'])) {
            $sql['order'] = 'ORDER BY ' . $paramarr['order'];
        }
        //limit
        if (!empty($paramarr['perpage'])) {
            $paramarr['perpage'] = intval($paramarr['perpage']);
            if (empty($paramarr['perpage'])) {
                $paramarr['perpage'] = 20;
            }
            if (empty($_SGET['page'])) {
                $_SGET['page'] = 1;
            }
            $_SGET['page'] = intval($_SGET['page']);
            if ($_SGET['page'] < 1) {
                $_SGET['page'] = 1;
            }
            $start = ($_SGET['page'] - 1) * $paramarr['perpage'];
            $sql['limit'] = 'LIMIT ' . $start . ',' . $paramarr['perpage'];
        } else {
            if (empty($paramarr['limit'])) {
                $sql['limit'] = 'LIMIT 0,1';
            } else {
                $paramarr['limit'] = getdotstring($paramarr['limit'], 'int', true, array(), 1, false);
                if ($paramarr['limit']) {
                    $sql['limit'] = 'LIMIT ' . $paramarr['limit'];
                } else {
                    $sql['limit'] = 'LIMIT 0,1';
                }
            }
        }
        //query
        $sqlstring = implode(' ', $sql);
        //multi
        $listcount = 1;
        if (!empty($paramarr['perpage'])) {
            $listcount = $_SGLOBAL['db']->result($_SGLOBAL['db']->query('SELECT COUNT(*) FROM ' . tname($paramarr['name'] . 'items') . ' i ' . $sql['where']), 0);
            if ($listcount) {
                $urlarr = $_SGET;
                unset($urlarr['page']);
                $theblockarr['multipage'] = multi($listcount, $paramarr['perpage'], $_SGET['page'], $urlarr, 0);
            }
        }
    } else {
        include_once S_ROOT . './function/block_sql.func.php';
        list($sqlstring, $listcount) = runsql($paramarr);
        if (!empty($paramarr['perpage'])) {
            if ($listcount) {
                $urlarr = $_SGET;
                unset($urlarr['page']);
                $theblockarr['multipage'] = multi($listcount, $paramarr['perpage'], $_SGET['page'], $urlarr, 0);
            }
        }
    }
    if ($listcount) {
        //预处理
        if (empty($paramarr['subjectdot'])) {
            $paramarr['subjectdot'] = 0;
        }
        if (!empty($paramarr['showcategory'])) {
            include_once S_ROOT . './function/model.func.php';
            $cacheinfo = getmodelinfoall('modelname', $paramarr['name']);
        }
        $query = $_SGLOBAL['db']->query($sqlstring);
        $itemids = array();
        while ($value = $_SGLOBAL['db']->fetch_array($query)) {
            //处理
            $value['subjectall'] = $value['subject'];
            if (!empty($value['subject']) && !empty($paramarr['subjectlen'])) {
                $value['subject'] = cutstr($value['subject'], $paramarr['subjectlen'], $paramarr['subjectdot']);
            }
            //链接
            $value['url'] = geturl('action/model/name/' . $paramarr['name'] . '/itemid/' . $value['itemid']);
            //内容处理
            if (!empty($value['message']) && !empty($paramarr['messagelen'])) {
                $value['message'] = trim(strip_tags($value['message']));
                $value['message'] = trim(cutstr($value['message'], $paramarr['messagelen'], $paramarr['messagedot']));
            }
            //图片地址
            if (!empty($value['subjectimage'])) {
                $value['subjectimage'] = A_URL . '/' . $value['subjectimage'];
            } else {
                $value['subjectimage'] = S_URL . '/images/base/nopic.gif';
            }
            //分类名
            if (!empty($cacheinfo['categoryarr'][$value['catid']])) {
                $value['catname'] = $cacheinfo['categoryarr'][$value['catid']];
            }
            $theblockarr[$value['itemid']] = $value;
        }
    }
    return $theblockarr;
}
开发者ID:cwcw,项目名称:cms,代码行数:101,代码来源:block.func.php

示例3: exit

<?php

/*
	[SupeSite] (C) 2007-2009 Comsenz Inc.
	$Id: modelview.php 13359 2009-09-22 09:06:19Z zhaofei $
*/
if (!defined('IN_SUPESITE')) {
    exit('Access Denied');
}
include_once S_ROOT . './function/model.func.php';
$_SGET['name'] = !empty($_SGET['name']) ? trim($_SGET['name']) : '';
$channel = $_SGET['name'];
if (!checkperm('allowview')) {
    showmessage('no_permission');
}
$cacheinfo = getmodelinfoall('modelname', $_SGET['name']);
if (empty($cacheinfo['models'])) {
    showmessage('visit_the_channel_does_not_exist', S_URL);
}
$modelsinfoarr = $cacheinfo['models'];
$categories = $cacheinfo['categories'];
$itemid = empty($_SGET['itemid']) ? 0 : intval($_SGET['itemid']);
//导航
$channelsmore = array();
if (!empty($channels['menus']) && count($channels['menus']) > 12) {
    $channelsmore = $channels['menus'];
    for ($i = 0; $i < 12; $i++) {
        array_shift($channelsmore);
    }
}
$item = $gatherarr = $columnsallinfoarr = array();
开发者ID:jonycookie,项目名称:projectm2,代码行数:31,代码来源:modelview.php

示例4: foreach

foreach(array('itemid', 'nid', 'uid', 'catid', 'shopid', 'albumid', 'groupid', 'upid', 'displayorder', 'cmid') as $value) {
	//$_GET[$value] = $_POST[$value] = $_REQUEST[$value] = intval(!empty($_POST[$value])?$_POST[$value]:(!empty($_GET[$value])?$_GET[$value]:0));
}
*/
//載入語言包
include_once B_ROOT . './language/admin.lang.php';
$lang = array_merge($lang, $alang);
//記錄log
$extralog = implodearray(array('GET' => $_GET, 'POST' => $_POST), array('formhash', 'submit', 'action'));
writelog(substr($BASESCRIPT, 0, -4) . 'log', implode("\t", clearlogstring(array($_G['timestamp'], $_G['username'], $_G['clientip'], $_REQUEST['action'], $extralog))));
if (!in_array($_GET['m'], $models)) {
    $_GET['m'] = 'shop';
}
//讀入緩存
if (!in_array($_GET['m'], array('album', 'photo', 'brandlinks'))) {
    $cacheinfo = getmodelinfoall('modelname', $_GET['m']);
    $mname = $cacheinfo['models']['modelname'];
    $mid = $cacheinfo['models']['mid'];
    $categorylist = $_G['categorylist'];
} else {
    $mname = $_GET['m'];
}
//審核等級對應關係
$_SGLOBAL['shopgrade'] = array(3 => $lang['grade_3'], 1 => $lang['grade_1'], 2 => $lang['grade_2'], 0 => $lang['grade_0'], 5 => $lang['grade_5']);
if ($_GET['m'] != 'shop') {
    unset($_SGLOBAL['shopgrade'][4]);
    $_SGLOBAL['shopgrade'][3] = $lang['grade_3_other'];
    if (pkperm('isadmin')) {
        $_SGLOBAL['shopgrade'][5] = $lang['grade_5'];
    } elseif ($_G['myshopstatus'] == 'verified' && !$_SGLOBAL['panelinfo']['group']['verify' . $mname]) {
        $_SGLOBAL['shopgrade'][5] = $lang['grade_5'];
开发者ID:pan289091315,项目名称:Discuz,代码行数:31,代码来源:common.inc.php

示例5: changemodelfolder

function changemodelfolder($modelname, $ids, $undel = 0)
{
    global $_SGLOBAL, $_SCONFIG, $systemfieldarr;
    include_once S_ROOT . './include/model_field.inc.php';
    $_GET['mid'] = empty($_GET['mid']) ? 0 : intval($_GET['mid']);
    if (is_array($ids)) {
        $ids = simplode($ids);
    }
    if ($undel == 1) {
        //还原
        $columnsarr = $feedimg = $defaultarr = $setmessagesqlarr = $setmessagesqlnoitemidarr = array();
        $query = $_SGLOBAL['db']->query('SELECT * FROM ' . tname('modelcolumns') . ' WHERE mid = \'' . $_GET['mid'] . '\'');
        while ($result = $_SGLOBAL['db']->fetch_array($query)) {
            $columnsarr[$result['fieldname']] = $result['isfixed'];
            if (empty($result['isfixed'])) {
                $defaultarr[$result['fieldname']] = $result['fielddefault'];
            }
            if ($result['formtype'] == 'img') {
                $feedimg[] = $result['fieldname'];
            }
        }
        foreach ($systemfieldarr as $tmpvalue) {
            $columnsarr[$tmpvalue['fieldname']] = $tmpvalue['isfixed'];
            if (empty($tmpvalue['isfixed'])) {
                $defaultarr[$tmpvalue['fieldname']] = $tmpvalue['fielddefault'];
            }
        }
        $idarr = explode(',', str_replace('\'', '', $ids));
        $uids = getuids($idarr, 'modelfolders');
        updatecredit('delnews', $uids);
        $query = $_SGLOBAL['db']->query('SELECT * FROM ' . tname('modelfolders') . ' i WHERE i.mid=\'' . $_GET['mid'] . '\' AND i.itemid IN (' . $ids . ')');
        $i = $j = 0;
        $addfeed = array();
        while ($result = $_SGLOBAL['db']->fetch_array($query)) {
            $data = $setitemssqlarr = array();
            $data = unserialize($result['message']);
            $tmpdefaultarr = $defaultarr;
            if (empty($data['itemid'])) {
                $addfeed[$i] = $data;
            }
            unset($data['addfeed']);
            foreach ($data as $tmpkey => $tmpvalue) {
                if ($columnsarr[$tmpkey] == 1 || preg_match("/^click_/i", $tmpkey) || preg_match("/^attaches/i", $tmpkey)) {
                    $setitemssqlarr[$tmpkey] = $tmpvalue;
                } else {
                    $tmpdefaultarr[$tmpkey] = $tmpvalue;
                }
            }
            if (empty($data['itemid'])) {
                $setmessagesqlnoitemidarr[$j] = $tmpdefaultarr;
            } else {
                $setmessagesqlarr[$i] = $tmpdefaultarr;
            }
            if (empty($data['itemid'])) {
                $setmessagesqlnoitemidarr[$j]['itemid'] = $addfeed[$i]['itemid'] = inserttable($modelname . 'items', $setitemssqlarr, 1);
                $oldhash = getmodelhash($_GET['mid'], $result['itemid'], 'f');
                $hash = getmodelhash($_GET['mid'], $setmessagesqlnoitemidarr[$j]['itemid']);
                $_SGLOBAL['db']->query('UPDATE ' . tname('attachments') . ' SET hash=\'' . $hash . '\' WHERE hash = \'' . $oldhash . '\'');
                $j++;
            } else {
                $setmessagesqlarr[$i]['itemid'] = $data['itemid'];
                inserttable($modelname . 'items', $setitemssqlarr);
                $i++;
            }
        }
        if (allowfeed()) {
            $cacheinfo = getmodelinfoall('modelname', $modelname);
            foreach ($addfeed as $feedvalue) {
                if (!empty($feedvalue['addfeed']) && !empty($feedvalue['uid'])) {
                    $feed['uid'] = $feedvalue['uid'];
                    $feed['username'] = $feedvalue['username'];
                    $feed['icon'] = 'comment';
                    $feed['title_template'] = 'feed_model_title';
                    $feed['title_data'] = array('modelname' => '<a href="' . S_URL_ALL . '/m.php?name=' . $modelname . '">' . $cacheinfo['models']['modelalias'] . '</a>');
                    $feed['body_template'] = 'feed_model_message';
                    $feed['body_data'] = array('subject' => '<a href="' . geturl('action/model/name/' . $modelname . '/itemid/' . $feedvalue['itemid'], 1) . '">' . $feedvalue['subject'] . '</a>', 'message' => cutstr(strip_tags(preg_replace("/\\[.+?\\]/is", '', $feedvalue['message'])), 150));
                    if (!empty($feedvalue['subjectimage'])) {
                        $feed['images'][] = array('url' => A_URL . '/' . $feedvalue['subjectimage'], 'link' => geturl('action/model/name/' . $modelname . '/itemid/' . $feedvalue['itemid'], 1));
                    } else {
                        $feedbool = false;
                        foreach ($feedimg as $feedimgvalue) {
                            if (!empty($feedvalue[$feedimgvalue])) {
                                $feed['images'][] = array('url' => A_URL . '/' . $feedvalue[$feedimgvalue], 'link' => geturl('action/model/name/' . $modelname . '/itemid/' . $feedvalue['itemid'], 1));
                                break;
                            }
                        }
                        if (empty($feed['images'])) {
                            $picurl = getmessagepic(stripslashes($feedvalue['message']));
                            if (!empty($picurl)) {
                                $feed['images'][] = array('url' => $picurl, 'link' => geturl('action/model/name/' . $modelname . '/itemid/' . $feedvalue['itemid'], 1));
                            }
                        }
                    }
                    postfeed($feed);
                }
            }
        }
        $insertvalue = $insertkey = $comma = $pre = '';
        if (!empty($setmessagesqlarr)) {
            foreach ($setmessagesqlarr[0] as $tmpkey => $tmpvalue) {
//.........这里部分代码省略.........
开发者ID:superman1982,项目名称:ng-cms,代码行数:101,代码来源:model.func.php

示例6: empty

                    $newchannel = $channel;
                }
                $postmenus[] = $key;
            }
        }
    }
    $channel = $nameid = empty($newchannel) ? $nameid : $newchannel;
    if (!checkperm('allowpost')) {
        showmessage('no_permission', S_URL . '/cp.php?ac=news');
    }
}
if (empty($channels['menus'][$nameid])) {
    showmessage('visit_the_channel_does_not_exist');
} elseif ($channels['menus'][$nameid]['type'] == 'model') {
    include_once S_ROOT . './function/ebook.func.php';
    $cacheinfo = getmodelinfoall('modelname', $nameid);
} else {
    showmessage('', S_URL . '/cp.php?ac=news&op=add&type=' . $nameid, 0);
}
$do = empty($_GET['do']) ? 'me' : trim($_GET['do']);
$itemid = empty($_GET['itemid']) ? 0 : intval($_GET['itemid']);
$catid = empty($_GET['catid']) ? 0 : intval($_GET['catid']);
$page = empty($_GET['page']) && intval($_GET['page']) < 1 ? 1 : intval($_GET['page']);
$perpage = 20;
$start = ($page - 1) * $perpage;
$wheresql = $mpurlstr = '';
if (!empty($catid)) {
    $wheresql .= " AND catid='{$catid}' ";
}
if (submitcheck('postsubmit')) {
    if (!empty($_POST['itemid']) && empty($_SGLOBAL['supe_uid'])) {
开发者ID:superman1982,项目名称:ng-cms,代码行数:31,代码来源:cp_ebook.php

示例7: empty

    }
}
$perpage = empty($_SCONFIG['commviewnum']) ? 50 : intval($_SCONFIG['commviewnum']);
//显示条数
$page = empty($_SGET['page']) ? 0 : intval($_SGET['page']);
$order = !empty($_SGET['order']) && in_array($_SGET['order'], array('1', '2', '3', '4')) ? intval($_SGET['order']) : 0;
$page = $page < 1 ? 1 : $page;
$start = ($page - 1) * $perpage;
$itemid = empty($_SGET['itemid']) ? 0 : intval($_SGET['itemid']);
$type = empty($_SGET['type']) ? 'news' : trim($_SGET['type']);
if (!$itemid || empty($_SCONFIG['commstatus'])) {
    showmessage('not_found', S_URL);
}
if ($channels['menus'][$type]['type'] == 'model') {
    include_once S_ROOT . './function/model.func.php';
    $cacheinfo = getmodelinfoall('modelname', $type);
    if (empty($cacheinfo['models'])) {
        showmessage('visit_the_channel_does_not_exist', S_URL);
    }
    $modelsinfoarr = $cacheinfo['models'];
    $categories = $cacheinfo['categories'];
    $query = $_SGLOBAL['db']->query('SELECT i.*, ii.* FROM ' . tname($type . 'items') . ' i, ' . tname($type . 'message') . ' ii WHERE i.itemid = ii.itemid AND i.itemid=\'' . $itemid . '\' AND i.allowreply=\'1\'');
    $ismodle = '1';
} else {
    $query = $_SGLOBAL['db']->query('SELECT i.*, ii.* FROM ' . tname('spaceitems') . ' i, ' . tname('spacenews') . ' ii WHERE i.itemid = ii.itemid AND i.itemid=\'' . $itemid . '\' AND i.allowreply=\'1\'');
    $ismodle = '0';
}
if (!($item = $_SGLOBAL['db']->fetch_array($query))) {
    showmessage('not_found', S_URL);
}
$channel = $type = empty($item['type']) ? $type : $item['type'];
开发者ID:superman1982,项目名称:ng-cms,代码行数:31,代码来源:viewcomment.php

示例8: exit

/*
	[SupeSite] (C) 2007-2009 Comsenz Inc.
	$Id: admin_modelfolders.php 13411 2009-10-22 03:13:01Z zhaofei $
*/
if (!defined('IN_SUPESITE_ADMINCP')) {
    exit('Access Denied');
}
include_once S_ROOT . './function/model.func.php';
$_GET['mid'] = postget('mid');
$_GET['mid'] = !empty($_GET['mid']) ? intval($_GET['mid']) : 0;
$perpage = 20;
//每页显示列表数目
$resultmodels = array();
if (!empty($_GET['mid'])) {
    $cacheinfo = getmodelinfoall('mid', $_GET['mid']);
    if (empty($cacheinfo['models'])) {
        showmessage('exists_module_error');
    }
    $resultmodels = $cacheinfo['models'];
} else {
    showmessage('exists_module_error');
}
if (in_array($resultmodels['modelname'], $_SCONFIG['closechannels'])) {
    showmessage('usetype_no_open');
}
//获取的变量初始化
$_SGET['page'] = intval(postget('page'));
$_SGET['order'] = postget('order');
$_SGET['sc'] = postget('sc');
$_SGET['searchkey'] = stripsearchkey(postget('searchkey'));
开发者ID:superman1982,项目名称:ng-cms,代码行数:30,代码来源:admin_modelfolders.php

示例9: tname

        case 7:
            $_POST['grade'] = '-1';
            break;
        case 8:
            $_POST['grade'] = '-2';
            break;
        case 9:
            $_POST['grade'] = '-3';
            break;
    }
}
$actionurl = "?action-modeledit-name-" . $modelsinfoarr['modelname'] . "-mid-" . $modelsinfoarr['mid'] . "-catid-" . $catid . "-itemid-" . $itemid;
$theurl = "?action-model-name-" . $modelsinfoarr['modelname'] . "-mid-" . $modelsinfoarr['mid'] . "-catid-" . $catid . "-itemid-" . $itemid;
$tablename = tname($modelsinfoarr['modelname'] . 'items');
if (submitcheck('valuesubmit')) {
    $cacheinfo2 = getmodelinfoall('mid', $_POST['mid']);
    //echo '<PRE>';
    //print_r($cacheinfo2);
    if (empty($cacheinfo2['models'])) {
        showmessage('exists_module_error');
    }
    $itemid = intval($_POST['itemid']);
    $query = $_SGLOBAL['db']->query('SELECT * FROM ' . $tablename . ' WHERE itemid=\'' . $itemid . '\'');
    $thevalue = $_SGLOBAL['db']->fetch_array($query);
    if (intval($thevalue['grade']) > 0 && $_SGLOBAL['member']['groupname']['rdm'] < 1) {
        showmessage('no_modify_checked_item');
    }
    if (!(check_cate_perm($catid) || check_cate_director($catid) || $_SGLOBAL['supe_uid'] == $thevalue['uid'])) {
        showmessage('no_permission');
    }
    $theurl = "?action-model-name-" . $modelsinfoarr['modelname'] . "-mid-" . $modelsinfoarr['mid'] . "-catid-" . $catid . "-itemid-" . $itemid;
开发者ID:superman1982,项目名称:ng-cms,代码行数:31,代码来源:modeledit.php

示例10: exit

/*
	[SupeSite] (C) 2007-2009 Comsenz Inc.
	$Id: site.php 10928 2009-01-06 05:13:03Z zhanglijun $
*/
if (!defined('IN_SUPESITE')) {
    exit('Access Denied');
}
if (!empty($_SGET['type'])) {
    $tplname = 'site_' . trim(str_replace(array('..', '/', '\\'), '', $_SGET['type']));
    if ($_SGET['type'] == 'map') {
        include_once S_ROOT . './function/model.func.php';
        $modelarr = array();
        foreach ($channels['menus'] as $key => $val) {
            if ($val['type'] == 'model' && $val['status'] == 1) {
                $catlistarr = getmodelinfoall('modelname', $key);
                $modelarr[$key] = array('modelalias' => $catlistarr['models']['modelalias'], 'modelname' => $catlistarr['models']['modelname'], 'categories' => $catlistarr['categories']);
            }
        }
        $title = $lang['site_map'];
    } elseif ($_SGET['type'] == 'link') {
        $title = $lang['site_link'];
    }
} else {
    header('Location: ' . S_URL);
    exit;
}
if (file_exists(S_ROOT . './templates/' . $_SCONFIG['template'] . '/' . $tplname . '.html.php')) {
    include template($tplname);
} else {
    header('Location: ' . S_URL);
开发者ID:hongz1125,项目名称:devil,代码行数:30,代码来源:site.php

示例11: exit

<?php

/*
	[SupeSite] (C) 2007-2009 Comsenz Inc.
	$Id: admin_blocks_model.inc.php 11948 2009-04-15 06:38:46Z zhaofei $
*/
if (!defined('IN_SUPESITE_ADMINCP')) {
    exit('Access Denied');
}
include_once S_ROOT . './function/model.func.php';
$categories = array();
$catlistarr = getmodelinfoall('modelname', $_GET['modelname']);
if (!empty($catlistarr)) {
    foreach ($catlistarr['categories'] as $key => $value) {
        $categories[$key]['name'] = $value;
    }
}
if (!isset($theblcokvalue['setitemid'])) {
    $theblcokvalue['setitemid'] = '';
}
if ($theblcokvalue['setitemid'] == '1') {
    $divsetitemid1display = '';
    $divsetitemid2display = 'none';
} else {
    $divsetitemid1display = 'none';
    $divsetitemid2display = '';
}
//multi
if (!isset($theblcokvalue['showmultipage'])) {
    $theblcokvalue['showmultipage'] = 0;
}
开发者ID:cwcw,项目名称:cms,代码行数:31,代码来源:admin_blocks_model.inc.php

示例12: showmessage

 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: attend.php 4452 2010-09-14 12:35:50Z fanshengshuai $
 */
require_once './common.php';
if (!$_G['setting']['multipleshop']) {
    if (intval($_G['myshopid']) > 0) {
        showmessage($lang['oneowner_onshop'], "index.php");
    }
}
$do = $_GET['do'];
require_once B_ROOT . './uc_client/client.php';
include_once B_ROOT . './source/function/cache.func.php';
//讀入緩存
$mname = 'shop';
$cacheinfo = getmodelinfoall('modelname', $mname);
$mid = $cacheinfo['models']['mid'];
if ($do && $do == "register") {
    //第三步,提交數據,檢查填寫的基本信息
    if (submitcheck('attendsubmit')) {
        $checkunits = array(array('subject', '2', '30', $lang['attend_subject_error']), array('address', '5', '30', $lang['attend_address_error']));
        if (!empty($cacheinfo['columns'])) {
            foreach ($cacheinfo['columns'] as $column) {
                if ($column['allowpost'] == 1 && $column['allowshow'] == 1 && $column['formtype'] != 'img' && $column['isrequired'] == 1 && preg_match('/(^ext_)|(^applicant)/', $column['fieldname'])) {
                    $errormessage = !empty($lang['attend_' . $column['fieldname'] . '_error']) ? $lang['attend_' . $column['fieldname'] . '_error'] : ($column['fieldminlength'] < $column['fieldlength'] ? $column['fieldtitle'] . $lang['is'] . $column['fieldminlength'] . '-' . $column['fieldlength'] . $lang['word'] : $column['fieldlength'] . $lang['word']);
                    array_push($checkunits, array($column['fieldname'], $column['fieldminlength'], $column['fieldlength'], $errormessage));
                }
            }
        }
        $checkresults = array();
        foreach ($checkunits as $unit) {
开发者ID:pan289091315,项目名称:Discuz,代码行数:31,代码来源:attend.php


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