📄 input.php
字号:
<?php
/*
澶栭儴鏁版嵁鎻愪氦鎺ュ彛
*/
require '../include/common.inc.php';
$categoty_keys = array_keys($CATEGORY);
if(!is_numeric($catid) || !in_array($catid,$categoty_keys))
{
header('HTTP/1.1 102 catid error');
exit;
}
require_once 'admin/content.class.php';
require_once 'attachment.class.php';
$attachment = new attachment('phpcms', $catid);
$member = load('member.class.php', 'member', 'include');
$r = $member->login($username, $password);
if(!$r)
{
header('HTTP/1.1 100 login failed');
exit;
}
@extract($r, EXTR_PREFIX_ALL, '');
$G = cache_read('member_group_'.$_groupid.'.php');
if(!$G['allowpost'] || !$priv_group->check('catid', $catid, 'input', $_groupid))
{
header('HTTP/1.1 103 Access Denied'.$G['allowpost']);
exit;
}
$c = new content();
$modelid = $CATEGORY[$catid]['modelid'];
if(!$template) $template = $CATEGORY[$catid]['template_show'];
$array_fields = cache_read($modelid.'_fields.inc.php', CACHE_MODEL_PATH);
$thumb = $attachment->remotefileurls('thumb',$thumb);
foreach ($array_fields AS $key=>$value)
{
if($value['iscore'] || !$value['isadd']) continue;
$data[$key] = $$key;
}
$contentid = $c->add($data);
if(!$contentid) if(!$r) header('HTTP/1.1 101 input failed');
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -