本文整理汇总了PHP中fields_order函数的典型用法代码示例。如果您正苦于以下问题:PHP fields_order函数的具体用法?PHP fields_order怎么用?PHP fields_order使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fields_order函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: aheader
include_once M_ROOT . "./include/upload.cls.php";
include_once M_ROOT . "./include/cheader.inc.php";
include_once M_ROOT . "./include/mcuedit.cls.php";
$inajax ? aheader() : _header();
if (!empty($mcommu['setting']['norepeat']) && ($cid = $db->result_one("SELECT cid FROM {$tblprefix}mflinks WHERE mid='{$mid}' AND fromid='{$memberid}' ORDER BY cid"))) {
mcmessage('dorepeataddflink', axaction(2, M_REFERER));
}
$db->query("INSERT INTO {$tblprefix}mflinks SET\n\t\t\tmid='{$mid}',\n\t\t\tmname='" . $actuser->info['mname'] . "',\n\t\t\tfromid='{$memberid}',\n\t\t\tfromname='" . $curuser->info['mname'] . "',\n\t\t\tcreatedate='{$timestamp}'\n\t\t\t");
if ($cid = $db->insert_id()) {
$uedit = new cls_mcuedit();
$uedit->read($cid, 'flink');
foreach (array('fields') as $var) {
${$var} =& $uedit->{$var};
}
$c_upload = new cls_upload();
$fields = fields_order($fields);
$a_field = new cls_field();
foreach ($fields as $k => $v) {
if (!$v['isfunc'] && !$v['isadmin']) {
$a_field->init();
$a_field->field = $v;
if ($curuser->pmbypmids('field', $v['pmid'])) {
$a_field->oldvalue = '';
$a_field->deal('communew');
if (!empty($a_field->error)) {
$c_upload->rollback();
$uedit->delete();
mcmessage($a_field->error, axaction(2, M_REFERER));
}
$uedit->updatefield($k, $a_field->newvalue);
if ($arr = multi_val_arr($a_field->newvalue, $v)) {
示例2: check_submit_func
check_submit_func($submitstr);
a_guide('memberdetail');
} else {
$minfosnew['email'] = empty($minfosnew['email']) ? '' : trim($minfosnew['email']);
if (empty($minfosnew['email']) || !isemail($minfosnew['email'])) {
amessage('memberemailillegal', M_REFERER);
}
if (!empty($minfosnew['password']) && strlen($minfosnew['password']) > 15 || $minfosnew['password'] != addslashes($minfosnew['password'])) {
amessage('memberpwdillegal', M_REFERER);
}
$minfosnew['password'] = trim($minfosnew['password']);
$actuser->updatefield('email', $minfosnew['email'], 'main');
!empty($minfosnew['password']) && $actuser->updatefield('password', md5(md5($minfosnew['password'])), 'main');
$actuser->updatefield('mtcid', empty($minfosnew['mtcid']) ? 0 : $minfosnew['mtcid'], 'main');
$c_upload = new cls_upload();
$mfields = fields_order($mfields);
$a_field = new cls_field();
foreach ($mfields as $k => $v) {
if ($v['available'] && !$v['issystem'] && !$v['isfunc']) {
$a_field->init();
$a_field->field = $v;
if (!$curuser->pmbypmids('field', $a_field->field['pmid'])) {
continue;
}
$a_field->oldvalue = isset($actuser->info[$k]) ? $actuser->info[$k] : '';
$a_field->deal('minfosnew');
if (!empty($a_field->error)) {
$c_upload->rollback();
amessage($a_field->error, M_REFERER);
}
$actuser->updatefield($k, $a_field->newvalue, $v['tbl']);
示例3: cls_field
$a_field = new cls_field();
foreach ($bfields as $k => $v) {
if (!$v['isfunc'] && in_array($k, $citems)) {
$a_field->init();
$a_field->field = $v;
$a_field->oldvalue = isset($report[$k]) ? $report[$k] : '';
$a_field->trfield('communew', '', 'b');
$submitstr .= $a_field->submitstr;
}
}
unset($a_field);
tabfooter('newcommu');
check_submit_func($submitstr);
} else {
$c_upload = new cls_upload();
$bfields = fields_order($bfields);
$sqlstr = '';
$a_field = new cls_field();
foreach ($ucotypes as $k => $v) {
if (in_array('uccid' . $k, $citems) && $v['umode'] != 1) {
if ($v['notblank'] && empty($communew['uccid' . $k])) {
amessage('notnull', axaction(2, M_REFERER), $v['cname']);
}
$sqlstr .= ",uccid{$k}='" . $communew['uccid' . $k] . "'";
if ($v['emode']) {
$communew["uccid{$k}date"] = !isdate($communew["uccid{$k}date"]) ? 0 : strtotime($communew["uccid{$k}date"]);
if ($communew["uccid{$k}"] && !$communew["uccid{$k}date"] && $v['emode'] == 2) {
amessage('setcoclass', axaction(2, M_REFERER), $v['cname']);
}
!$communew["uccid{$k}"] && ($communew["uccid{$k}date"] = 0);
$sqlstr .= ",uccid{$k}date='" . $communew["uccid{$k}date"] . "'";
示例4: elseif
}
}
} elseif (submitcheck('bordercancel')) {
//取消订单,返还库存
$order['state'] && $order['state'] != 1 && mcmessage('cheordcanmod', $forward);
$db->query("UPDATE {$tblprefix}orders SET state=-2,updatedate='{$timestamp}' WHERE oid='{$oid}'");
$query = $db->query("SELECT aid,nums FROM {$tblprefix}purchases WHERE oid='{$oid}'");
while ($row = $db->fetch_array($query)) {
$db->query("UPDATE {$tblprefix}archives_sub SET storage=storage+{$row['nums']} WHERE aid={$row['aid']} AND storage>=0");
}
mcmessage('ordersmodifyfinish', $forward);
} elseif (submitcheck('borderinfo')) {
//修改买家信息
!$order['state'] || $order['state'] == 1 || mcmessage('cheordcanmod', $forward);
$c_upload = new cls_upload();
$pfields = fields_order($pfields);
$a_field = new cls_field();
$sqlstr = "";
foreach ($pfields as $k => $v) {
$a_field->init();
$a_field->field = $v;
$a_field->deal('cartnew');
if (!empty($a_field->error)) {
$c_upload->rollback();
mcmessage($a_field->error, M_REFERER);
}
$sqlstr .= ($sqlstr ? ',' : '') . $k . "='" . $a_field->newvalue . "'";
if ($arr = multi_val_arr($a_field->newvalue, $v)) {
foreach ($arr as $x => $y) {
$sqlstr .= ($sqlstr ? ',' : '') . $k . '_' . $x . "='{$y}'";
}
示例5: tabheader
tabheader($mcommu['cname'] . ' - ' . lang('submitmessage'));
foreach ($mbfields as $k => $v) {
if (!$v['isadmin'] && !$v['isfunc'] && in_array($k, $fieldsarr)) {
$a_field->init();
$a_field->field = $v;
$a_field->oldvalue = isset($reportold[$k]) ? $reportold[$k] : '';
$a_field->trfield('reportnew', '', 'mb');
$submitstr .= $a_field->submitstr;
}
}
unset($a_field);
tabfooter('breportdetail', '', strbutton('', 'goback', "redirect('{$forward}');"));
check_submit_func($submitstr);
} else {
$c_upload = new cls_upload();
$mbfields = fields_order($mbfields);
$sqlstr = '';
$a_field = new cls_field();
foreach ($mbfields as $k => $v) {
if (!$v['isadmin'] && !$v['isfunc'] && in_array($k, $fieldsarr)) {
$a_field->init();
$a_field->field = $v;
$a_field->oldvalue = isset($reportold[$k]) ? $reportold[$k] : '';
$a_field->deal('reportnew');
if (!empty($a_field->error)) {
$c_upload->rollback();
mcmessage($a_field->error, M_REFERER);
}
$sqlstr .= ($sqlstr ? ',' : '') . "{$k}='" . $a_field->newvalue . "'";
if ($arr = multi_val_arr($a_field->newvalue, $v)) {
foreach ($arr as $x => $y) {
示例6: isset
continue;
}
$a_field->init();
$a_field->field = $field;
$a_field->oldvalue = isset($catalog[$field['ename']]) ? $catalog[$field['ename']] : '';
$a_field->trfield('catalognew', '', 'ca');
$submitstr .= $a_field->submitstr;
}
tabfooter('bcatalogdetail');
check_submit_func($submitstr);
a_guide('catalogdetail');
} else {
$forward = empty($forward) ? M_REFERER : $forward;
$catalognew['dirname'] = strtolower($catalognew['dirname']);
$c_upload = new cls_upload();
$cafields = fields_order($cafields);
$a_field = new cls_field();
$sqlstr = "";
foreach ($cafields as $k => $v) {
$a_field->init();
$a_field->field = $v;
$a_field->oldvalue = isset($catalog[$k]) ? $catalog[$k] : '';
$a_field->deal('catalognew');
if (!empty($a_field->error)) {
$c_upload->rollback();
amessage($a_field->error, $forward);
}
$sqlstr .= ',' . $k . "='" . $a_field->newvalue . "'";
if ($arr = multi_val_arr($a_field->newvalue, $v)) {
foreach ($arr as $x => $y) {
$sqlstr .= ',' . $k . '_' . $x . "='{$y}'";
示例7: elseif
} elseif ($uid == -5) {
message('mememailillegal');
} elseif ($uid == -6) {
message('mememailillegal');
} else {
message('erroroperate');
}
}
}
if (!($mchannel = $mchannels[$mchid])) {
message('choosememchann');
}
foreach (array('additems') as $var) {
${$var} = $mchannel[$var] ? explode(',', $mchannel[$var]) : array();
}
$mfields = fields_order(read_cache('mfields', $mchid));
$autocheck = $mchannel['autocheck'];
$mainarr = $subarr = $customarr = array();
$mainarr['mname'] = $mname;
$mainarr['password'] = $md5_password;
$mainarr['email'] = $email;
if (in_array('mtcid', $additems)) {
$mainarr['mtcid'] = empty($mtcid) ? 1 : $mtcid;
}
foreach ($grouptypes as $k => $v) {
if (!$v['mode'] && in_array("grouptype{$k}", $additems)) {
$mainarr["grouptype{$k}"] = empty(${"grouptype{$k}"}) ? 0 : ${"grouptype{$k}"};
}
}
foreach ($currencys as $crid => $currency) {
if ($currency['available'] && $currency['initial']) {
示例8: unset
}
if ($coclassnew['conditions']['closed'] == '-1') {
unset($coclassnew['conditions']['closed']);
}
$coclassnew['conditions']['sqlstr'] = trim($coclassnew['conditions']['sqlstr']);
if ($coclassnew['conditions']['sqlstr'] == '') {
unset($coclassnew['conditions']['sqlstr']);
}
if (empty($coclassnew['conditions'])) {
amessage('setself_regcondition', axaction(2, M_REFERER));
}
$coclassnew['conditions'] = addslashes(serialize($coclassnew['conditions']));
$sqlstr0 .= ",conditions='{$coclassnew['conditions']}'";
}
$c_upload = new cls_upload();
$ccfields = fields_order($ccfields);
$a_field = new cls_field();
$sqlstr = "";
foreach ($ccfields as $k => $v) {
$a_field->init();
$a_field->field = $v;
$a_field->oldvalue = !isset($coclass[$k]) ? '' : $coclass[$k];
$a_field->deal('coclassnew');
if (!empty($a_field->error)) {
$c_upload->rollback();
amessage($a_field->error, "?entry=coclass&action=coclassdetail&coid={$coid}&ccid={$ccid}");
}
$sqlstr .= ',' . $k . "='" . $a_field->newvalue . "'";
if ($arr = multi_val_arr($a_field->newvalue, $v)) {
foreach ($arr as $x => $y) {
$sqlstr .= ',' . $k . '_' . $x . "='{$y}'";
示例9: tabheader
tabheader($mcommu['cname'] . ' - ' . lang('submitmessage'));
foreach ($mlfields as $k => $v) {
if (!$v['isadmin'] && !$v['isfunc'] && in_array($k, $fieldsarr)) {
$a_field->init();
$a_field->field = $v;
$a_field->oldvalue = isset($flinkold[$k]) ? $flinkold[$k] : '';
$a_field->trfield('flinknew', '', 'ml');
$submitstr .= $a_field->submitstr;
}
}
unset($a_field);
tabfooter('bflinkdetail', '', strbutton('', 'goback', "redirect('{$forward}');"));
check_submit_func($submitstr);
} else {
$c_upload = new cls_upload();
$mlfields = fields_order($mlfields);
$sqlstr = '';
$a_field = new cls_field();
foreach ($mlfields as $k => $v) {
if (!$v['isadmin'] && !$v['isfunc'] && in_array($k, $fieldsarr)) {
$a_field->init();
$a_field->field = $v;
$a_field->oldvalue = isset($flinkold[$k]) ? $flinkold[$k] : '';
$a_field->deal('flinknew');
if (!empty($a_field->error)) {
$c_upload->rollback();
mcmessage($a_field->error, M_REFERER);
}
$sqlstr .= ($sqlstr ? ',' : '') . "{$k}='" . $a_field->newvalue . "'";
if ($arr = multi_val_arr($a_field->newvalue, $v)) {
foreach ($arr as $x => $y) {