| @@ -129,8 +129,14 @@ if ($dopost == 'quick') { | |||
| if (!isset($sitepath)) $sitepath = ''; | |||
| if ($topid == 0 && $reid > 0) $topid = $reid; | |||
| if ($ispart != 0) $cross = 0; | |||
| $apienabled = ($apienabled == 0)? 0 : 1; | |||
| $description = Html2Text($description, 1); | |||
| $keywords = Html2Text($keywords, 1); | |||
| $apikey = Html2Text($apikey, 1); | |||
| if ($apienabled == 1 && empty($apikey)) { | |||
| ShowMsg("API密钥不能为空", "-1"); | |||
| exit(); | |||
| } | |||
| if ($ispart != 2) { | |||
| //栏目的参照目录 | |||
| if ($referpath == 'cmspath') $nextdir = '{cmspath}'; | |||
| @@ -167,7 +173,7 @@ if ($dopost == 'quick') { | |||
| exit(); | |||
| } | |||
| } | |||
| $in_query = "INSERT INTO `#@__arctype` (reid,topid,sortrank,typename,cnoverview,enname,enoverview,bigpic,litimg,typedir,isdefault,defaultname,issend,channeltype,tempindex,templist,temparticle,modname,namerule,namerule2,ispart,corank,description,keywords,seotitle,moresite,siteurl,sitepath,ishidden,`cross`,`crossid`,`content`,`smalltypes`) VALUES ('$reid','$topid','$sortrank','$typename','$cnoverview','$enname','$enoverview','$bigpic','$litimg','$typedir','$isdefault','$defaultname','$issend','$channeltype','$tempindex','$templist','$temparticle','default','$namerule','$namerule2','$ispart','$corank','$description','$keywords','$seotitle','$moresite','$siteurl','$sitepath','$ishidden','$cross','$crossid','$content','$smalltypes')"; | |||
| $in_query = "INSERT INTO `#@__arctype` (reid,topid,sortrank,typename,cnoverview,enname,enoverview,bigpic,litimg,typedir,isdefault,defaultname,issend,channeltype,tempindex,templist,temparticle,modname,namerule,namerule2,ispart,corank,description,keywords,seotitle,moresite,siteurl,sitepath,ishidden,`cross`,`crossid`,`content`,`smalltypes`,`apienabled`,`apikey`) VALUES ('$reid','$topid','$sortrank','$typename','$cnoverview','$enname','$enoverview','$bigpic','$litimg','$typedir','$isdefault','$defaultname','$issend','$channeltype','$tempindex','$templist','$temparticle','default','$namerule','$namerule2','$ispart','$corank','$description','$keywords','$seotitle','$moresite','$siteurl','$sitepath','$ishidden','$cross','$crossid','$content','$smalltypes','$apienabled','$apikey')"; | |||
| if (!$dsql->ExecuteNoneQuery($in_query)) { | |||
| ShowMsg("保存目录数据时失败,请检查您的输入资料是否存在问题", "-1"); | |||
| exit(); | |||
| @@ -26,7 +26,7 @@ if ($dopost == "save") { | |||
| $uptopsql = " ,siteurl='$siteurl',sitepath='$sitepath',ishidden='$ishidden' "; | |||
| } | |||
| if ($ispart != 0) $cross = 0; | |||
| $upquery = "UPDATE `#@__arctype` SET issend='$issend',sortrank='$sortrank',typename='$typename',cnoverview='$cnoverview',enname='$enname',enoverview='$enoverview',bigpic='$bigpic',litimg='$litimg',typedir='$typedir',isdefault='$isdefault',defaultname='$defaultname',issend='$issend',ishidden='$ishidden',channeltype='$channeltype',tempindex='$tempindex',templist='$templist',temparticle='$temparticle',namerule='$namerule',namerule2='$namerule2',ispart='$ispart',corank='$corank',description='$description',keywords='$keywords',seotitle='$seotitle',moresite='$moresite',`cross`='$cross',`content`='$content',`crossid`='$crossid',`smalltypes`='$smalltypes'$uptopsql WHERE id='$id' "; | |||
| $upquery = "UPDATE `#@__arctype` SET issend='$issend',sortrank='$sortrank',typename='$typename',cnoverview='$cnoverview',enname='$enname',enoverview='$enoverview',bigpic='$bigpic',litimg='$litimg',typedir='$typedir',isdefault='$isdefault',defaultname='$defaultname',issend='$issend',ishidden='$ishidden',channeltype='$channeltype',tempindex='$tempindex',templist='$templist',temparticle='$temparticle',namerule='$namerule',namerule2='$namerule2',ispart='$ispart',corank='$corank',description='$description',keywords='$keywords',seotitle='$seotitle',moresite='$moresite',`cross`='$cross',`content`='$content',`crossid`='$crossid',`smalltypes`='$smalltypes',`apienabled`='$apienabled',`apikey`='$apikey'$uptopsql WHERE id='$id' "; | |||
| if (!$dsql->ExecuteNoneQuery($upquery)) { | |||
| ShowMsg("保存栏目失败,请您检查栏目字段是否存在问题", "-1"); | |||
| exit(); | |||
| @@ -93,6 +93,12 @@ | |||
| if (cross2.checked) crossid.style.display = 'block'; | |||
| else crossid.style.display = 'none'; | |||
| } | |||
| function makeAPIKey(){ | |||
| var apikey = document.getElementById('apikey'); | |||
| jQuery.get("sys_info.php?dopost=make_encode", function(data) { | |||
| jQuery("#apikey").val(data); | |||
| }); | |||
| } | |||
| </script> | |||
| </head> | |||
| <body> | |||
| @@ -339,9 +345,10 @@ | |||
| <tr> | |||
| <td>是否支持跨站数据:</td> | |||
| <td> | |||
| <input type="text" name="" id="" class="admin-input-md" placeholder="请输入字符串类秘钥"> | |||
| <label><input type="radio" name="issend" value="1" <?php if ($issend==1) echo " checked='checked' ";?>> 支持</label> | |||
| <label><input type="radio" name="issend" value="0" <?php if ($issend==0) echo " checked='checked' ";?>> 不支持</label> | |||
| <input type="text" name="apikey" id="apikey" class="admin-input-md" placeholder="请输入字符串类秘钥"> | |||
| <span onclick="makeAPIKey()" title="帮助" class="btn btn-success btn-sm"><i class="fa fa-refresh"></i></span> | |||
| <label><input type="radio" name="apienabled" value="1"> 支持</label> | |||
| <label><input type="radio" name="apienabled" value="0" checked> 不支持</label> | |||
| </td> | |||
| <td colspan="2"></td> | |||
| </tr> | |||
| @@ -83,6 +83,12 @@ | |||
| if (cross2.checked) crossid.style.display = 'block'; | |||
| else crossid.style.display = 'none'; | |||
| } | |||
| function makeAPIKey(){ | |||
| var apikey = document.getElementById('apikey'); | |||
| jQuery.get("sys_info.php?dopost=make_encode", function(data) { | |||
| jQuery("#apikey").val(data); | |||
| }); | |||
| } | |||
| </script> | |||
| </head> | |||
| <body> | |||
| @@ -312,9 +318,10 @@ | |||
| <tr> | |||
| <td>是否支持跨站数据:</td> | |||
| <td> | |||
| <input type="text" name="" id="" class="admin-input-md" placeholder="请输入字符串类秘钥"> | |||
| <label><input type="radio" name="" value="1" <?php if ($myrow['issend']=="1") echo "checked='1'";?>> 支持</label> | |||
| <label><input type="radio" name="" value="0" <?php if ($myrow['issend']=="0") echo "checked='1'";?>> 不支持</label> | |||
| <input value="<?php echo $myrow['apikey']?>" type="text" name="apikey" id="apikey" class="admin-input-md" placeholder="请输入字符串类秘钥"> | |||
| <span onclick="makeAPIKey()" title="帮助" class="btn btn-success btn-sm"><i class="fa fa-refresh"></i></span> | |||
| <label><input type="radio" name="apienabled" value="1" <?php if ($myrow['apienabled']=="1") echo "checked='1'";?>> 支持</label> | |||
| <label><input type="radio" name="apienabled" value="0" <?php if ($myrow['apienabled']=="0") echo "checked='1'";?>> 不支持</label> | |||
| </td> | |||
| <td colspan="2"></td> | |||
| </tr> | |||
| @@ -121,4 +121,7 @@ INSERT INTO `#@__sys_payment`(`id`, `code`, `name`, `short_name`, `sortrank`, `c | |||
| INSERT INTO `#@__sys_payment`(`id`, `code`, `name`, `short_name`, `sortrank`, `config`, `status`) VALUES (3, 'Bank', '银行转账', '转账', 2, '{"AccountName":"泰隆商业银行上海杨浦支行","AccountNO":"31010090201000020658","Name":"上海穆云智能科技有限公司"}', 1); | |||
| INSERT INTO `#@__sys_payment`(`id`, `code`, `name`, `short_name`, `sortrank`, `config`, `status`) VALUES (4, 'Balance', '余额支付', '余额', 3, '{}', 1); | |||
| INSERT INTO `#@__sys_payment`(`id`, `code`, `name`, `short_name`, `sortrank`, `config`, `status`) VALUES (5, 'Cod', '货到付款', '货到付款', 4, '{}', 0); | |||
| ALTER TABLE `#@__member` ADD COLUMN `user_money` decimal(10, 2) UNSIGNED NULL DEFAULT 0.00 AFTER `send_max`; | |||
| ALTER TABLE `#@__member` ADD COLUMN `user_money` decimal(10, 2) UNSIGNED NULL DEFAULT 0.00 AFTER `send_max`; | |||
| -- 6.2.7 | |||
| ALTER TABLE `#@__arctype` ADD COLUMN `apienabled` tinyint UNSIGNED NULL DEFAULT 0 AFTER `smalltypes`,ADD COLUMN `apikey` varchar(64) NULL AFTER `apienabled`; | |||