if (!$chezhengname) { cpmsg(lang('plugin/yiqixueba', 'chezhengname_invalid'), '', 'error'); } if (!ispluginkey($chezhengname)) { cpmsg(lang('plugin/yiqixueba', 'chezhengname_invalid'), '', 'error'); } $ico = addslashes($_GET['chezhengimages']); if ($_FILES['chezhengimages']) { $upload = new discuz_upload(); if ($upload->init($_FILES['chezhengimages'], 'common') && $upload->save()) { $ico = $upload->attach['attachment']; } } if ($_POST['delete'] && addslashes($_POST['chezhengimages'])) { $valueparse = parse_url(addslashes($_POST['chezhengimages'])); if (!isset($valueparse['host']) && !strexists(addslashes($_POST['chezhengimages']), '{STATICURL}')) { @unlink($_G['setting']['attachurl'] . 'common/' . addslashes($_POST['chezhengimages'])); } $ico = ''; } $data = array('chezhengname' => $chezhengname, 'chezhengtitle' => $chezhengtitle, 'description' => $description, 'chezhengimages' => $ico, 'chezhengsort' => $chezhengsort, 'status' => $status, 'createtime' => $createtime); if ($chezhengid) { $data['updatetime'] = time(); C::t(GM('cheyouhui_' . $infotype))->update($chezhengid, $data); } else { C::t(GM('cheyouhui_' . $infotype))->insert($data); } echo '<style>.floattopempty { height: 30px !important; height: auto; } </style>'; cpmsg(lang('plugin/yiqixueba', 'edit_chezheng_succeed'), 'action=' . $this_page . '&subop=chezhenglist', 'succeed'); } }
if (!$membername) { cpmsg(lang('plugin/yiqixueba', 'membername_invalid'), '', 'error'); } if (!ispluginkey($membername)) { cpmsg(lang('plugin/yiqixueba', 'membername_invalid'), '', 'error'); } $ico = addslashes($_GET['memberimages']); if ($_FILES['memberimages']) { $upload = new discuz_upload(); if ($upload->init($_FILES['memberimages'], 'common') && $upload->save()) { $ico = $upload->attach['attachment']; } } if ($_POST['delete'] && addslashes($_POST['memberimages'])) { $valueparse = parse_url(addslashes($_POST['memberimages'])); if (!isset($valueparse['host']) && !strexists(addslashes($_POST['memberimages']), '{STATICURL}')) { @unlink($_G['setting']['attachurl'] . 'common/' . addslashes($_POST['memberimages'])); } $ico = ''; } $data = array('membername' => $membername, 'membertitle' => $membertitle, 'description' => $description, 'memberimages' => $ico, 'membersort' => $membersort, 'status' => $status, 'createtime' => $createtime); if ($memberid) { $data['updatetime'] = time(); C::t(GM('main_member'))->update($memberid, $data); } else { C::t(GM('main_member'))->insert($data); } echo '<style>.floattopempty { height: 30px !important; height: auto; } </style>'; cpmsg(lang('plugin/yiqixueba', 'edit_member_succeed'), 'action=' . $this_page . '&subop=memberlist', 'succeed'); } }
$shopsorts = api_indata('server_goodssort'); //$dznav = C::t('common_nav')->fetch_all_mainnav(); foreach (C::t('common_nav')->fetch_all_mainnav() as $k => $v) { if ($v['available'] == 1) { $dznav[$v['id']] = $v; } } //dump($dznav); //dump($_G['setting']['navs']); foreach ($shopsorts as $k => $v) { if ($v['sortupid'] == '') { $sorts[$v['sortname']] = $v; $sorts[$v['sortname']]['sortselect'] = str_replace('hover', 'select', $v['sortname']); foreach ($shopsorts as $k1 => $v1) { if ($v1['sortupid'] == $v['sortname']) { if ($sid == $v['sortname']) { $subsorts[] = $v1; } if (empty($sid)) { $subsorts[] = $v1; } } } if ($sid == $v['sortname']) { $subsorts = array_sort($subsorts, 'displayorder', 'asc'); } } } foreach ($subsorts as $k1 => $v1) { $subsortcounts[$v1['sortname']] = C::t(GM('shop_goods'))->count($v1['sortname']); }
function show($in_param, $value, $red = 'no') { if (is_array($in_param)) { $param = $in_param[0]; $help = $in_param[1]; $lvl = @$in_param[2]; } else { $param = $in_param; } if ($red == 1) { $color = 'red'; } elseif (!$red) { $color = 'green'; } else { $color = '#000000'; } if ($value == '1') { $value = GM('YES'); } elseif ($value == '0') { $value = GM('NO'); } if (@$lvl > 0 && $lvl <= @$_REQUEST['test']) { $bold = 'style="font-weight:bold"'; } else { $bold = ''; } @(print "<table width=100% border=0 cellspacing=0 cellpadding=2>\n\t\t<tr> \n\t\t\t<td nowrap align=right valign=top width=30% class=tablebody3>\n\t\t\t\t<font class=tablefieldtext {$bold}>{$param}:</font>\n\t\t\t</td>\n\t\t\t<td width=20% class=tablebody3 valign=top>\n\t\t\t\t<font class=tablebodytext style=\"color:{$color}\">\n\t\t\t\t{$value}\n\t\t\t\t</font>\n\t\t\t</td>\n\t\t\t<td class=tablebody3 valign=top><font class=smalltext>{$help} </font></td>\n\t\t</tr>\n\t\t</table>"); }
showmessage(lang('plugin/yiqixueba', 'nofieldname')); } if (!$fieldtitle) { showmessage(lang('plugin/yiqixueba', 'nofieldtitle')); } $data['fieldname'] = $fieldtype . '_' . $fieldname; $data['fieldtitle'] = $fieldtitle; $data['fieldtips'] = $fieldtips; $data['fieldclass'] = $fieldclass; $data['isrequired'] = $fieldrequired; $data['displayorder'] = $fielddisplayorder; $data['fieldparameter'] = $fieldparameter; C::t(GM('cheyouhui_field'))->insert($data); showmessage(lang('plugin/yiqixueba', 'addfield_success'), $this_page); } else { //$data['fieldname'] = $fname; $data['fieldtitle'] = $fieldtitle; $data['fieldtips'] = $fieldtips; $data['fieldclass'] = $fieldclass; $data['isrequired'] = $fieldrequired; $data['displayorder'] = $fielddisplayorder; $data['fieldparameter'] = $fieldparameter; C::t(GM('cheyouhui_field'))->update_by_fieldname($fname, $data); showmessage(lang('plugin/yiqixueba', 'editfield_success'), $this_page); } } } elseif ($subop == 'fielddel') { C::t(GM('cheyouhui_field'))->delete(getgpc('fname')); showmessage(lang('plugin/yiqixueba', 'delfield_success'), $this_page); } $subtpl = GV('cheyouhui_member_field');
<?php if (!defined('IN_DISCUZ')) { exit('Access Denied'); } require_once libfile('class/xml'); $sitegroups = xml2array(file_get_contents(MOKUAI_DIR . "/sitegroups.xml")); $site_info = C::t(GM('server_site'))->fetch($indata['siteurl']); if ($site_info['sitegroup'] == 'DAxEAvi2ie') { $shoptemps = getshoptemp(); foreach ($shoptemps as $k => $v) { $outdata[] = $v[0]; } } else { $outdata = $sitegroups[$site_info['sitegroup']]['shoptemp']; }
if (!$membername) { cpmsg(lang('plugin/yiqixueba', 'membername_invalid'), '', 'error'); } if (!ispluginkey($membername)) { cpmsg(lang('plugin/yiqixueba', 'membername_invalid'), '', 'error'); } $ico = addslashes($_GET['memberimages']); if ($_FILES['memberimages']) { $upload = new discuz_upload(); if ($upload->init($_FILES['memberimages'], 'common') && $upload->save()) { $ico = $upload->attach['attachment']; } } if ($_POST['delete'] && addslashes($_POST['memberimages'])) { $valueparse = parse_url(addslashes($_POST['memberimages'])); if (!isset($valueparse['host']) && !strexists(addslashes($_POST['memberimages']), '{STATICURL}')) { @unlink($_G['setting']['attachurl'] . 'common/' . addslashes($_POST['memberimages'])); } $ico = ''; } $data = array('membername' => $membername, 'membertitle' => $membertitle, 'description' => $description, 'memberimages' => $ico, 'membersort' => $membersort, 'status' => $status, 'createtime' => $createtime); if ($memberid) { $data['updatetime'] = time(); C::t(GM('cheyouhui_member'))->update($memberid, $data); } else { C::t(GM('cheyouhui_member'))->insert($data); } echo '<style>.floattopempty { height: 30px !important; height: auto; } </style>'; cpmsg(lang('plugin/yiqixueba', 'edit_member_succeed'), 'action=' . $this_page . '&subop=memberlist', 'succeed'); } }
if (!$goodscaijiname) { cpmsg(lang('plugin/yiqixueba', 'goodscaijiname_invalid'), '', 'error'); } if (!ispluginkey($goodscaijiname)) { cpmsg(lang('plugin/yiqixueba', 'goodscaijiname_invalid'), '', 'error'); } $ico = addslashes($_GET['goodscaijiimages']); if ($_FILES['goodscaijiimages']) { $upload = new discuz_upload(); if ($upload->init($_FILES['goodscaijiimages'], 'common') && $upload->save()) { $ico = $upload->attach['attachment']; } } if ($_POST['delete'] && addslashes($_POST['goodscaijiimages'])) { $valueparse = parse_url(addslashes($_POST['goodscaijiimages'])); if (!isset($valueparse['host']) && !strexists(addslashes($_POST['goodscaijiimages']), '{STATICURL}')) { @unlink($_G['setting']['attachurl'] . 'common/' . addslashes($_POST['goodscaijiimages'])); } $ico = ''; } $data = array('goodscaijiname' => $goodscaijiname, 'goodscaijititle' => $goodscaijititle, 'description' => $description, 'goodscaijiimages' => $ico, 'goodscaijisort' => $goodscaijisort, 'status' => $status, 'createtime' => $createtime); if ($goodscaijiid) { $data['updatetime'] = time(); C::t(GM('shop_goodscaiji'))->update($goodscaijiid, $data); } else { C::t(GM('shop_goodscaiji'))->insert($data); } echo '<style>.floattopempty { height: 30px !important; height: auto; } </style>'; cpmsg(lang('plugin/yiqixueba', 'edit_goodscaiji_succeed'), 'action=' . $this_page . '&subop=goodscaijilist', 'succeed'); } }
//radio showsetting(lang('plugin/yiqixueba', 'groupname'), 'groupname', $group_info['groupname'], 'text', '', 0, lang('plugin/yiqixueba', 'groupname_comment'), '', '', true); foreach ($infotypes as $k => $v) { if ($v['status']) { showsetting($v['infotypetitle'], array('quanxian', array(array($v['infotypename'] . '_add', lang('plugin/yiqixueba', 'add')), array($v['infotypename'] . '_del', lang('plugin/yiqixueba', 'del')), array($v['infotypename'] . '_edit', lang('plugin/yiqixueba', 'edit')), array($v['infotypename'] . '_cha', lang('plugin/yiqixueba', 'cha')))), dunserialize($group_info['quanxian']), 'mcheckbox', '', 0, '', '', '', true); } } showsubmit('submit'); showtablefooter(); showformfooter(); } else { $groupname = dhtmlspecialchars(trim($_GET['groupname'])); $status = intval($_GET['status']); if (!$groupname) { //cpmsg(lang('plugin/yiqixueba','groupname_invalid'), '', 'error'); } if (!ispluginkey($groupname)) { //cpmsg(lang('plugin/yiqixueba','groupname_invalid'), '', 'error'); } $data = array('groupname' => $groupname, 'status' => $status, 'quanxian' => serialize($_GET['quanxian'])); if ($groupid) { $data['updatetime'] = time(); C::t(GM('cheyouhui_group'))->update($groupid, $data); } else { $data['updatetime'] = time(); C::t(GM('cheyouhui_group'))->insert($data); } echo '<style>.floattopempty { height: 30px !important; height: auto; } </style>'; cpmsg(lang('plugin/yiqixueba', 'edit_group_succeed'), 'action=' . $this_page . '&subop=grouplist', 'succeed'); } }
showtagfooter('tbody'); showtagheader('tbody', "style_range", $field_info['type'] == 'range'); showtitle('threadtype_edit_vars_type_range'); showsetting('threadtype_edit_maxnum', 'rules[range][maxnum]', $field_info['rules']['maxnum'], 'text'); showsetting('threadtype_edit_minnum', 'rules[range][minnum]', $field_info['rules']['minnum'], 'text'); showsetting('threadtype_edit_inputsize', 'rules[range][inputsize]', $field_info['rules']['inputsize'], 'text'); showsetting('threadtype_edit_searchtxt', 'rules[range][searchtxt]', $field_info['rules']['searchtxt'], 'text'); showtagfooter('tbody'); showsubmit('submit'); showtablefooter(); showformfooter(); } else { $titlenew = trim($_GET['titlenew']); $_GET['namenew'] = trim($_GET['namenew']); if (!$titlenew || !$_GET['namenew']) { cpmsg('threadtype_infotypes_option_invalid', '', 'error'); } if (in_array(strtoupper($_GET['namenew']), $mysql_keywords)) { cpmsg('threadtype_infotypes_optionvariable_iskeyword', '', 'error'); } // if(C::t('forum_typeoption')->fetch_all_by_identifier($_GET['identifiernew'], 0, 1, $_GET['optionid']) || strlen($_GET['identifiernew']) > 40 || !ispluginkey($_GET['identifiernew'])) { // cpmsg('threadtype_infotypes_optionvariable_invalid', '', 'error'); // } $_GET['protectnew']['usergroup'] = $_GET['protectnew']['usergroup'] ? implode("\t", $_GET['protectnew']['usergroup']) : ''; $_GET['protectnew']['verify'] = $_GET['protectnew']['verify'] ? implode("\t", $_GET['protectnew']['verify']) : ''; $data = array('title' => $titlenew, 'description' => $_GET['descriptionnew'], 'name' => $_GET['namenew'], 'type' => $_GET['typenew'], 'unit' => $_GET['unitnew'], 'expiration' => $_GET['expirationnew'], 'protect' => serialize($_GET['protectnew']), 'rules' => serialize($_GET['rules'][$_GET['typenew']]), 'permprompt' => $_GET['permpromptnew']); C::t(GM('cheyouhui_field'))->update($fieldid, $data); echo '<style>.floattopempty { height: 30px !important; height: auto; } </style>'; cpmsg(lang('plugin/yiqixueba', 'edit_field_succeed'), 'action=' . $this_page . '&subop=fieldlist', 'succeed'); } }
showtablefooter(); showtableheader(lang('plugin/yiqixueba', 'membergroup_access')); $menus_member = C::t(GM('main_menus'))->fetch_all('member', 0, 'server'); foreach ($menus_member as $mk => $row) { $sub_menu = C::t(GM('main_menus'))->fetch_all('member', $row['menuid'], 'server'); $vers = array(); foreach ($sub_menu as $kk => $subrow) { list($mokuai) = explode("_", $subrow['modfile']); $vers[] = array($subrow['menuid'], $subrow['title'] . '(' . $mokuai . ')'); } showsetting($row['title'], array('versions', $vers), dunserialize($membergroup_info['versions']), 'mcheckbox', '', 0, lang('plugin/yiqixueba', 'membergroup_access_comment'), '', '', true); } showsubmit('submit'); showtablefooter(); showformfooter(); } else { $membergroup_name = dhtmlspecialchars(trim($_GET['name'])); if (!$membergroup_name) { cpmsg(lang('plugin/yiqixueba', 'membergroup_name_invalid'), '', 'error'); } $data = array('membergroupname' => $membergroup_name, 'status' => 1, 'versions' => serialize($_POST['versions'])); if ($membergroupid) { $data['updatetime'] = time(); C::t(GM('main_membergroup'))->update($membergroupid, $data); } else { $data['createtime'] = time(); C::t(GM('main_membergroup'))->insert($data); } cpmsg(lang('plugin/yiqixueba', 'add_membergroup_succeed'), 'action=' . $this_page . '&subop=membergrouplist', 'succeed'); } }
if (in_array(strtoupper($_GET['namenew']), $mysql_keywords)) { cpmsg('threadtype_infotypes_optionvariable_iskeyword', '', 'error'); } // if(C::t('forum_typeoption')->fetch_all_by_identifier($_GET['identifiernew'], 0, 1, $_GET['optionid']) || strlen($_GET['identifiernew']) > 40 || !ispluginkey($_GET['identifiernew'])) { // cpmsg('threadtype_infotypes_optionvariable_invalid', '', 'error'); // } $_GET['protectnew']['usergroup'] = $_GET['protectnew']['usergroup'] ? implode("\t", $_GET['protectnew']['usergroup']) : ''; $_GET['protectnew']['verify'] = $_GET['protectnew']['verify'] ? implode("\t", $_GET['protectnew']['verify']) : ''; $data = array('title' => $titlenew, 'description' => $_GET['descriptionnew'], 'name' => $_GET['namenew'], 'type' => $_GET['typenew'], 'unit' => $_GET['unitnew'], 'expiration' => $_GET['expirationnew'], 'protect' => serialize($_GET['protectnew']), 'rules' => serialize($_GET['rules'][$_GET['typenew']]), 'permprompt' => $_GET['permpromptnew']); C::t(GM('cheyouhui_field'))->update($fieldid, $data); echo '<style>.floattopempty { height: 30px !important; height: auto; } </style>'; cpmsg(lang('plugin/yiqixueba', 'edit_field_succeed'), 'action=' . $this_page . '&subop=field&infotypeid=' . $infotypeid, 'succeed'); } } elseif ($subop == 'shengcheng') { //找到追加字段的方法,待定 $tablename = 'y_' . md5($sitekey . 'cheyouhui_' . $cyhtable_info['infotypename']); $field_info = C::t(GM('cheyouhui_field'))->fetch_all_by_infotype($cyhtable_info['infotypename']); dump($field_info); $fields = "`" . $cyhtable_info['infotypename'] . "id` smallint(6) NOT NULL auto_increment,\n"; foreach ($field_info as $k => $v) { $fields .= "`" . $v['name'] . "` "; if ($v['type'] == 'number') { $fields .= "smallint(6)"; } $fields .= " NOT NULL ,\n"; } $fields .= "PRIMARY KEY (`" . $cyhtable_info['infotypename'] . "id`)"; dump($fields); echo '<style>.floattopempty { height: 30px !important; height: auto; } </style>'; //cpmsg(lang('plugin/yiqixueba','edit_infotype_succeed'), 'action='.$this_page, 'succeed'); }
$data_member['notifysound'] = 0; $data_member['timeoffset'] = 9999; $data_member['newpm'] = 0; $data_member['newprompt'] = 0; $data_member['accessmasks'] = 0; $data_member['allowadmincp'] = 0; $data_member['onlyacceptfriendpm'] = 0; $data_member['conisbind'] = 0; DB::insert('common_member', $data_member); $data['uid'] = $uid; } } else { $data['uid'] = 0; } $insertnum++; C::t(GM('yikatong_card'))->insert($data); } } echo '<style>.floattopempty { height: 30px !important; height: auto; } </style>'; cpmsg($insertnum . lang('plugin/yiqixueba', 'cardcat_make_succeed'), 'action=' . $this_page . '&subop=cardcatlist', 'succeed'); } } elseif ($subop == 'cardexport') { } elseif ($subop == 'cardimport') { if (!submitcheck('submit')) { showtips(lang('plugin/yiqixueba', 'cardimport_edit_tips')); showformheader($this_page . '&subop=cardimport&cardcatid=' . $cardcatid, 'enctype="multipart/form-data"'); showtableheader(lang('plugin/yiqixueba', 'cardimport_edit')); $cardcatid ? showhiddenfields($hiddenfields = array('cardcatid' => $cardcatid)) : ''; showsetting(lang('plugin/yiqixueba', 'import_file'), 'import_file', '', 'file', '', 0, lang('plugin/yiqixueba', 'import_file_comment'), '', '', true); showsubmit('submit'); showtablefooter();
if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) { exit('Access Denied'); } $subops = array('list', 'install'); $subop = in_array($subop, $subops) ? $subop : $subops[0]; $mokuai_info = api_indata('server_mokuaiinfo'); unset($mokuai_info['main']); foreach ($mokuai_info as $k => $v) { list($mokuai, $version) = explode($v); } if ($subop == 'list') { showtips(lang('plugin/yiqixueba', 'mokuai_list_tips')); showformheader($this_page . '&subop=list'); showtableheader(lang('plugin/yiqixueba', 'mokuai_list')); showsubtitle(array('', lang('plugin/yiqixueba', 'mokuai_name'), lang('plugin/yiqixueba', 'mokuai_version'), lang('plugin/yiqixueba', 'mokuai_price'), lang('plugin/yiqixueba', 'mokuai_installtime'), lang('plugin/yiqixueba', 'status'), '')); foreach (C::t(GM('main_mokuai'))->range() as $k => $row) { unset($mokuai_info[$row['biaoshi']][$row['version']]); if (!count($mokuai_info[$row['biaoshi']])) { unset($mokuai_info[$row['biaoshi']]); } showtablerow('', array('class="td25"', 'style="width:120px"', 'class="td28"', '', '', '', ''), array('<img src="' . cloudaddons_pluginlogo_url($row['biaoshi']) . '" onerror="this.src=\'static/image/admincp/plugin_logo.png\';this.onerror=null" width="40" height="40" align="left" />', '<span class="bold">' . $row['name'] . '-V' . $row['version'] . '</span>', $row['description'], $row['price'], dgmdate($row['createtime'], 'dt'), ($row['available'] ? "<a href=\"" . ADMINSCRIPT . "?action=" . $this_page . "&subop=close&mokuaiid={$row['mokuaiid']}\" >{$lang['closed']}</a>" : "<a href=\"" . ADMINSCRIPT . "?action=" . $this_page . "&subop=open&mokuaiid={$row['mokuaiid']}\">{$lang['enable']}</a>") . " " . (intval(end(array_keys($mokuai_info[$row['biaoshi']]))) > intval($row['version']) ? "<a href=\"" . ADMINSCRIPT . "?action=" . $this_page . "&subop=update&mokuaiid={$row['mokuaiid']}\">{$lang['plugins_config_upgrade']}</a> " : '') . "<a href=\"" . ADMINSCRIPT . "?action=" . $this_page . "&subop=uninstall&mokuaiid={$row['mokuaiid']}\">{$lang['plugins_config_uninstall']}</a> ")); } foreach ($mokuai_info as $k => $v) { $row = end($v); $key = end(array_keys($v)); showtablerow('', array('class="td25"', 'style="width:120px"', 'class="td28"', '', '', '', ''), array('<img src="' . cloudaddons_pluginlogo_url($k) . '" onerror="this.src=\'static/image/admincp/plugin_logo.png\';this.onerror=null" width="40" height="40" align="left" />', '<span class="bold">' . $row['name'] . '-V' . $key . '</span>', $row['description'], $row['price'] ? $row['price'] . lang('plugin/yiqixueba', 'rmb') : lang('plugin/yiqixueba', 'mianfei'), '', "<a href=\"" . ADMINSCRIPT . "?action=" . $this_page . "&subop=install&mokuainame=" . $k . "_" . $key . "\">{$lang['plugins_config_install']}</a>")); } showtablefooter(); showformfooter(); } elseif ($subop == 'install') { $data['mokuai'] = getgpc('mokuainame');
} } elseif ($subop == 'mokuai') { if (!submitcheck('submit')) { showtips(lang('plugin/yiqixueba', 'edit_sitemokuai_tips')); showformheader($this_page . '&subop=mokuai'); showtableheader(lang('plugin/yiqixueba', 'site_info')); showtablerow('', array(''), array(lang('plugin/yiqixueba', 'siteurl:') . $site_info['siteurl'] . ' ' . lang('plugin/yiqixueba', 'version:') . $site_info['version'] . ' ' . lang('plugin/yiqixueba', 'charset:') . $site_info['charset'] . ' ' . lang('plugin/yiqixueba', 'installtime:') . dgmdate($site_info['installtime']) . ' ' . lang('plugin/yiqixueba', 'updatetime:') . dgmdate($site_info['updatetime']))); showtablefooter(); showtableheader('search'); echo '<tr><td>'; echo "</span><input class=\"btn\" type=\"submit\" value=\"{$lang['search']}\" /></td></tr>"; showtablefooter(); showtableheader(lang('plugin/yiqixueba', 'sitemokuai_list')); showsubtitle(array('', lang('plugin/yiqixueba', 'mokuainame'), lang('plugin/yiqixueba', 'zhhyue'), lang('plugin/yiqixueba', 'sitemokuai'), lang('plugin/yiqixueba', 'dailiquyu'), lang('plugin/yiqixueba', 'status'), '')); $siteid ? showhiddenfields(array('siteid' => $siteid)) : ''; showsubmit('submit'); showtablefooter(); showformfooter(); } else { $data['sitegroup'] = serialize($_POST['sitegroup']); if ($siteid) { $data['updatetime'] = time(); C::t(GM('server_site'))->update($siteid, $data); } else { $data['createtime'] = time(); DB::insert('yiqixueba_server_site', $data); } echo '<style>.floattopempty { height: 30px !important; height: auto; } </style>'; cpmsg(lang('plugin/yiqixueba', 'edit_site_succeed'), 'action=' . $this_page . '&subop=sitelist', 'succeed'); } }
<?php if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) { exit('Access Denied'); } //dump($pages); //dump($tables); //dump($templates); foreach ($tables as $k => $v) { dump($v); dump(GM($v)); } //dump(file_exists(GC('cheyouhui_ajax'))); dump($mokuais);
function getyiqixuebanav($type = 1) { global $_G; $yiqixueba = array(); if ($type == 1) { foreach (C::t(GM('main_menus'))->fetch_all('yiqixueba', 0) as $mk => $row) { $topid = $row['name']; $yiqixueba[$topid]['name'] = $row['name']; $yiqixueba[$topid]['title'] = $row['title']; $yiqixueba[$topid]['displayorder'] = $row['displayorder']; foreach (C::t(GM('main_menus'))->fetch_all('yiqixueba', $row['menuid']) as $kk => $subrow) { $subid = $subrow['name']; $yiqixueba[$topid]['submenu'][$subid]['name'] = $subrow['name']; $yiqixueba[$topid]['submenu'][$subid]['title'] = $subrow['title']; $yiqixueba[$topid]['submenu'][$subid]['displayorder'] = $subrow['displayorder']; $yiqixueba[$topid]['submenu'][$subid]['modfile'] = $subrow['modfile']; } } } if ($type == 2) { require_once libfile('class/xml'); $mokuais = xml2array(file_get_contents(MOKUAI_DIR . "/mokuai.xml")); foreach ($mokuais as $k => $v) { $node = xml2array(file_get_contents(MOKUAI_DIR . "/" . $k . "/" . $v['currentversion'] . "/node.xml")); foreach ($node as $k1 => $v1) { list($mt, $mn) = explode("_", $k1); if ($mt == 'yiqixueba' && $mn && $v1['menu']) { $topid = $k; $yiqixueba[$topid]['name'] = $k; $yiqixueba[$topid]['title'] = $v['name']; $yiqixueba[$topid]['displayorder'] = $v['displayorder']; $subid = $mn; $yiqixueba[$topid]['submenu'][$subid]['name'] = $mn; $yiqixueba[$topid]['submenu'][$subid]['title'] = $v1['title']; $yiqixueba[$topid]['submenu'][$subid]['displayorder'] = $v1['displayorder']; $yiqixueba[$topid]['submenu'][$subid]['modfile'] = $k . '_' . $k1; } } $yiqixueba[$topid]['submenu'] = array_sort($yiqixueba[$topid]['submenu'], 'displayorder', 'asc'); } $yiqixueba = array_sort($yiqixueba, 'displayorder', 'asc'); } return $yiqixueba; }
<?php if (!defined('IN_DISCUZ')) { exit('Access Denied'); } $sid = getgpc('sid'); $subsid = getgpc('subsid'); $navtitle = lang('plugin/yiqixueba', 'shop'); require_once GC('shop_yiqixueba_shophead'); //参考网站http://www.pailezu.com/ $goods = C::t(GM('shop_goods'))->range(); include template(GT('shop_goodslist'));
} if (ispluginkey($goodsname)) { dump('sql'); cpmsg(lang('plugin/yiqixueba', 'goodsname_invalid'), '', 'error'); } $ico = addslashes($_GET['goodsimages']); if ($_FILES['goodsimages']) { $upload = new discuz_upload(); if ($upload->init($_FILES['goodsimages'], 'common') && $upload->save()) { $ico = $upload->attach['attachment']; } } if ($_POST['delete'] && addslashes($_POST['goodsimages'])) { $valueparse = parse_url(addslashes($_POST['goodsimages'])); if (!isset($valueparse['host']) && !strexists(addslashes($_POST['goodsimages']), '{STATICURL}')) { @unlink($_G['setting']['attachurl'] . 'common/' . addslashes($_POST['goodsimages'])); } $ico = ''; } $data = array('shopid' => $shopid, 'goodsname' => $goodsname, 'goodstitle' => $goodstitle, 'description' => $description, 'goodsimages' => $ico, 'goodssort' => $goodssort, 'status' => $status, 'newprice' => $newprice, 'price' => $price, 'youxiaotime' => $youxiaotime); if ($goodsid) { $data['updatetime'] = time(); C::t(GM('shop_goods'))->update($goodsid, $data); } else { //$data['createtime'] => time(); C::t(GM('shop_goods'))->insert($data); } echo '<style>.floattopempty { height: 30px !important; height: auto; } </style>'; cpmsg(lang('plugin/yiqixueba', 'edit_goods_succeed'), 'action=' . $this_page . '&subop=goodslist', 'succeed'); } }
${$contractsample} = ''; } $data = array(); $datas = $_GET['shopgroup_info']; $datas['shopgroupico'] = $shopgroupico; $datas['contractsample'] = $contractsample; $datas['xiaofei'] = serialize($_GET['xiaofei']); $datas['dianzhang'] = serialize($_GET['dianzhang']); $datas['caiwu'] = serialize($_GET['caiwu']); $datas['shouyin'] = serialize($_GET['shouyin']); $datas['shopgroupdescription'] = stripslashes($_POST['shopgroupdescription']); foreach ($datas as $k => $v) { if (in_array($k, array('xiaofei', 'dianzhang', 'caiwu', 'shouyin'))) { $data[$k] = trim($v); } else { $data[$k] = htmlspecialchars(trim($v)); } //if(!DB::result_first("describe ".DB::table('yiqixueba_shop_group')." ".$k)) { //$sql = "alter table ".DB::table('yiqixueba_shop_group')." add `".$k."` varchar(255) not Null;"; //runquery($sql); //} } if ($shopgroupid) { C::t(GM('shop_shopgroup'))->update($shopgroupid, $data); } else { C::t(GM('shop_shopgroup'))->insert($data); } echo '<style>.floattopempty { height: 30px !important; height: auto; } </style>'; cpmsg(lang('plugin/yiqixueba', 'shopgroup_edit_succeed'), 'action=' . $this_page . '&subop=shopgrouplist', 'succeed'); } }
$settingsort = trim($_GET['settingsort']); if (!$settingname) { cpmsg(lang('plugin/yiqixueba', 'settingname_invalid'), '', 'error'); } if (!ispluginkey($settingname)) { cpmsg(lang('plugin/yiqixueba', 'settingname_invalid'), '', 'error'); } $ico = addslashes($_GET['settingimages']); if ($_FILES['settingimages']) { $upload = new discuz_upload(); if ($upload->init($_FILES['settingimages'], 'common') && $upload->save()) { $ico = $upload->attach['attachment']; } } if ($_POST['delete'] && addslashes($_POST['settingimages'])) { $valueparse = parse_url(addslashes($_POST['settingimages'])); if (!isset($valueparse['host']) && !strexists(addslashes($_POST['settingimages']), '{STATICURL}')) { @unlink($_G['setting']['attachurl'] . 'common/' . addslashes($_POST['settingimages'])); } $ico = ''; } $data = array('settingname' => $settingname, 'settingtitle' => $settingtitle, 'description' => $description, 'settingimages' => $ico, 'settingsort' => $settingsort, 'status' => $status, 'createtime' => $createtime); if ($settingid) { $data['updatetime'] = time(); C::t(GM('main_setting'))->update($settingid, $data); } else { C::t(GM('main_setting'))->insert($data); } echo '<style>.floattopempty { height: 30px !important; height: auto; } </style>'; cpmsg(lang('plugin/yiqixueba', 'edit_setting_succeed'), 'action=' . $this_page . '&subop=settinglist', 'succeed'); }
<?php if (!defined('IN_DISCUZ')) { exit('Access Denied'); } $this_page = 'plugin.php?' . $_SERVER['QUERY_STRING']; $subops = array('jiashizhenglist', 'jiashizhengedit'); $subop = in_array($subop, $subops) ? $subop : $subops[0]; if ($subop == 'jiashizhenglist') { } elseif ($subop == 'jiashizhengedit') { $fields = C::t(GM('cheyouhui_field'))->fetch_all_by_fieldtype('jsz'); dump($fields); } $subtpl = GV('cheyouhui_jiashizheng');
<?php if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) { exit('Access Denied'); } $shopsetting = C::t(GM('shop_shopsetting'))->range(); $shoptemplates = api_indata('server_shoptemplate'); foreach ($shoptemplates as $k => $v) { $shoptempradio[] = array($v, lang('plugin/yiqixueba', 'shoptemp_' . $v)); } if (!submitcheck('submit')) { showtips(lang('plugin/yiqixueba', 'edit_basesetting_tips')); showformheader($this_page . '&subop=edit', 'enctype'); showtableheader(lang('plugin/yiqixueba', 'basesetting_option')); showsetting(lang('plugin/yiqixueba', 'shoptemplate'), array('shopsetting[shoptemplate]', $shoptempradio), $shopsetting['shoptemplate']['svalue'], 'select', '', 0, lang('plugin/yiqixueba', 'basesettingstatus_comment'), '', '', true); //radio showsubmit('submit'); showtablefooter(); showformfooter(); } else { foreach ($_POST['shopsetting'] as $k => $v) { $data = array('skey' => $k, 'svalue' => $v); if (!C::t(GM('shop_shopsetting'))->skey_exists($k)) { C::t(GM('shop_shopsetting'))->insert($data); } else { C::t(GM('shop_shopsetting'))->update($k, $data); } } echo '<style>.floattopempty { height: 30px !important; height: auto; } </style>'; cpmsg(lang('plugin/yiqixueba', 'edit_basesetting_succeed'), 'action=' . $this_page . '&subop=basesettinglist', 'succeed'); }
<?php if (!defined('IN_DISCUZ')) { exit('Access Denied'); } $gid = getgpc('gid'); $sid = getgpc('sid'); $subsid = getgpc('subsid'); require_once GC('shop_yiqixueba_shophead'); $goods_info = C::t(GM('shop_goods'))->fetch($gid); $goods_info['zhekou'] = round($goods_info['newprice'] / $goods_info['price'], 2); $goods_info['createtime'] = str_replace("-", "/", dgmdate($goods_info['createtime'], 'd')) . ' 00:00:00'; $goods_info['description'] = htmlspecialchars_decode($goods_info['description']); //参考网站http://www.pailezu.com/ $navtitle = lang('plugin/yiiqxueba', 'shop'); include template(GV('shop_yiqixueba_' . $temp . '_goodsplay'));