pluginvar.func.php 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717
  1. <?php
  2. /**
  3. * This is NOT a freeware, use is subject to license terms
  4. * From www.1314study.com ver 1.0.1
  5. */
  6. if(!defined('IN_DISCUZ')) {
  7. exit('http://bbs.9026.com/');
  8. }
  9. if(!defined('CLOUDADDONS_WEBSITE_URL')) {
  10. require_once libfile('function/cloudaddons');
  11. }
  12. function s_showsettings($pluginvars,$pluginvars_array){
  13. global $_G, $lang,$plugin;
  14. $extra = array();
  15. $s_e = 'ex';
  16. foreach($pluginvars_array as $k => $variable){
  17. if(!isset($pluginvars[$variable])){
  18. continue;
  19. }
  20. $var = $pluginvars[$variable];
  21. if(strexists($var['type'], '_')) {
  22. continue;
  23. }
  24. $var['variable'] = 'varsnew['.$var['variable'].']';
  25. if($var['type'] == 'number') {
  26. $var['type'] = 'text';
  27. } elseif($var['type'] == 'select') {
  28. $var['type'] = "<select name=\"$var[variable]\">\n";
  29. foreach(explode("\n", $var['extra']) as $key => $option) {
  30. $option = trim($option);
  31. if(strpos($option, '=') === FALSE) {
  32. $key = $option;
  33. } else {
  34. $item = explode('=', $option);
  35. $key = trim($item[0]);
  36. $option = trim($item[1]);
  37. }
  38. $var['type'] .= "<option value=\"".dhtmlspecialchars($key)."\" ".($var['value'] == $key ? 'selected' : '').">$option</option>\n";
  39. }
  40. $var['type'] .= "</select>\n";
  41. $var['variable'] = $var['value'] = '';
  42. } elseif($var['type'] == 'selects') {
  43. $var['value'] = unserialize($var['value']);
  44. $var['value'] = is_array($var['value']) ? $var['value'] : array($var['value']);
  45. $var['type'] = "<select name=\"$var[variable][]\" multiple=\"multiple\" size=\"10\">\n";
  46. foreach(explode("\n", $var['extra']) as $key => $option) {
  47. $option = trim($option);
  48. if(strpos($option, '=') === FALSE) {
  49. $key = $option;
  50. } else {
  51. $item = explode('=', $option);
  52. $key = trim($item[0]);
  53. $option = trim($item[1]);
  54. }
  55. $var['type'] .= "<option value=\"".dhtmlspecialchars($key)."\" ".(in_array($key, $var['value']) ? 'selected' : '').">$option</option>\n";
  56. }
  57. $var['type'] .= "</select>\n";
  58. $var['variable'] = $var['value'] = '';
  59. } elseif($var['type'] == 'date') {
  60. $var['type'] = 'calendar';
  61. $extra['date'] = '<script type="text/javascript" src="static/js/calendar.js"></script>';
  62. } elseif($var['type'] == 'datetime') {
  63. $var['type'] = 'calendar';
  64. $var['extra'] = 1;
  65. $extra['date'] = '<script type="text/javascript" src="static/js/calendar.js"></script>';
  66. } elseif($var['type'] == 'forum') {
  67. require_once libfile('function/forumlist');
  68. $var['type'] = '<select name="'.$var['variable'].'"><option value="">'.cplang('plugins_empty').'</option>'.forumselect(FALSE, 0, $var['value'], TRUE).'</select>';
  69. $var['variable'] = $var['value'] = '';
  70. } elseif($var['type'] == 'forums') {
  71. $var['description'] = ($var['description'] ? (isset($lang[$var['description']]) ? $lang[$var['description']] : $var['description'])."\n" : '').$lang['plugins_edit_vars_multiselect_comment']."\n".$var['comment'];
  72. $var['value'] = unserialize($var['value']);
  73. $var['value'] = is_array($var['value']) ? $var['value'] : array();
  74. require_once libfile('function/forumlist');
  75. $var['type'] = '<select name="'.$var['variable'].'[]" size="10" multiple="multiple"><option value="">'.cplang('plugins_empty').'</option>'.forumselect(FALSE, 0, 0, TRUE).'</select>';
  76. foreach($var['value'] as $v) {
  77. $var['type'] = str_replace('<option value="'.$v.'">', '<option value="'.$v.'" selected>', $var['type']);
  78. }
  79. $var['variable'] = $var['value'] = '';
  80. } elseif(substr($var['type'], 0, 5) == 'group') {
  81. if($var['type'] == 'groups') {
  82. $var['description'] = ($var['description'] ? (isset($lang[$var['description']]) ? $lang[$var['description']] : $var['description'])."\n" : '').$lang['plugins_edit_vars_multiselect_comment']."\n".$var['comment'];
  83. $var['value'] = unserialize($var['value']);
  84. $var['type'] = '<select name="'.$var['variable'].'[]" size="10" multiple="multiple"><option value=""'.(@in_array('', $var['value']) ? ' selected' : '').'>'.cplang('plugins_empty').'</option>';
  85. } else {
  86. $var['type'] = '<select name="'.$var['variable'].'"><option value="">'.cplang('plugins_empty').'</option>';
  87. }
  88. $var['value'] = is_array($var['value']) ? $var['value'] : array($var['value']);
  89. $query = DB::query("SELECT type, groupid, grouptitle, radminid FROM ".DB::table('common_usergroup')." ORDER BY (creditshigher<>'0' || creditslower<>'0'), creditslower, groupid");
  90. $groupselect = array();
  91. while($group = DB::fetch($query)) {
  92. $group['type'] = $group['type'] == 'special' && $group['radminid'] ? 'specialadmin' : $group['type'];
  93. $groupselect[$group['type']] .= '<option value="'.$group['groupid'].'"'.(@in_array($group['groupid'], $var['value']) ? ' selected' : '').'>'.$group['grouptitle'].'</option>';
  94. }
  95. $var['type'] .= '<optgroup label="'.$lang['usergroups_member'].'">'.$groupselect['member'].'</optgroup>'.
  96. ($groupselect['special'] ? '<optgroup label="'.$lang['usergroups_special'].'">'.$groupselect['special'].'</optgroup>' : '').
  97. ($groupselect['specialadmin'] ? '<optgroup label="'.$lang['usergroups_specialadmin'].'">'.$groupselect['specialadmin'].'</optgroup>' : '').
  98. '<optgroup label="'.$lang['usergroups_system'].'">'.$groupselect['system'].'</optgroup></select>';
  99. $var['variable'] = $var['value'] = '';
  100. } elseif($var['type'] == 'extcredit') {
  101. $var['type'] = '<select name="'.$var['variable'].'"><option value="">'.cplang('plugins_empty').'</option>';
  102. foreach($_G['setting']['extcredits'] as $id => $credit) {
  103. $var['type'] .= '<option value="'.$id.'"'.($var['value'] == $id ? ' selected' : '').'>'.$credit['title'].'</option>';
  104. }
  105. $var['type'] .= '</select>';
  106. $var['variable'] = $var['value'] = '';
  107. } elseif($var['type'] == 'mcheckbox' || $var['type'] == 'mcheckbox2'){
  108. $drkextra = explode(chr(10),$var['extra']);
  109. foreach($drkextra as $val){
  110. $extr = explode('=', $val);
  111. $arr[] = array($extr[0],trim($extr[1]));
  112. }
  113. $var['variable'] = array($var['variable'],$arr);
  114. unset($arr);
  115. $var['value'] = unserialize($var['value']);
  116. } elseif($var['type'] == 'portal'){
  117. include_once libfile('function/portalcp');
  118. $var['type'] = category_showselect('portal', $var['variable'], false, $var['value']);
  119. } elseif($var['type'] == 'portals'){
  120. $var['description'] = ($var['description'] ? (isset($lang[$var['description']]) ? $lang[$var['description']] : $var['description'])."\n" : '').$lang['plugins_edit_vars_multiselect_comment']."\n".$var['comment'];
  121. $var['value'] = unserialize($var['value']);
  122. $var['value'] = is_array($var['value']) ? $var['value'] : array();
  123. require_once libfile('function/forumlist');
  124. $var['type'] = '<select name="'.$var['variable'].'[]" size="10" multiple="multiple"><option value="">'.cplang('plugins_empty').'</option>'.s_portalselect('catid', 0, '').'</select>';
  125. foreach($var['value'] as $v) {
  126. $var['type'] = str_replace('<option value="'.$v.'">', '<option value="'.$v.'" selected>', $var['type']);
  127. }
  128. $var['variable'] = $var['value'] = '';
  129. } elseif($var['type'] == 'mradio' || $var['type'] == 'mradio2'){
  130. $extras = explode(chr(10), $var['extra']);
  131. $a[] = $var['variable'];
  132. foreach($extras as $value){
  133. $extra = explode('=', $value);
  134. $b[$var['variable'].'ext'] = '';
  135. $c[] = $extra[0];
  136. $c[] = $extra[1];
  137. $c[] = $b;
  138. $d[] = $c;
  139. unset($b);
  140. unset($c);
  141. }
  142. $a[] = $d;
  143. unset($d);
  144. $var['variable'] = $a;
  145. unset($a);
  146. $extra = '';
  147. }
  148. s_showsetting(isset($lang[$var['title']]) ? $lang[$var['title']] : dhtmlspecialchars($var['title']), $var['variable'], $var['value'], $var['type'], '', 0, isset($lang[$var['description']]) ? $lang[$var['description']] : nl2br(dhtmlspecialchars($var['description'])), dhtmlspecialchars($var['extra']), '', true);
  149. }
  150. $s_e .= 'it';
  151. $md5file = $plugin['identifier'] . '.plugin';
  152. $array = array();
  153. if(file_exists(DISCUZ_ROOT.'./data/addonmd5/'.$md5file.'.xml')) {
  154. require_once libfile('class/xml');
  155. $xml = implode('', @file(DISCUZ_ROOT.'./data/addonmd5/'.$md5file.'.xml'));
  156. $array = xml2array($xml);
  157. } else {
  158. $array = false;
  159. }
  160. require_once DISCUZ_ROOT.'./source/discuz_version.php';
  161. $uniqueid = DB::result_first("SELECT svalue FROM ".DB::table('common_setting')." WHERE skey='siteuniqueid'");
  162. $data = 'siteuniqueid='.rawurlencode($uniqueid).'&siteurl='.rawurlencode($_G['siteurl']).'&sitever='.DISCUZ_VERSION.'/'.DISCUZ_RELEASE.'&sitecharset='.CHARSET.'&mysiteid='.$_G['setting']['my_siteid'];
  163. $param = 'data='.rawurlencode(base64_encode($data));
  164. $param .= '&md5hash='.substr(md5($data.TIMESTAMP), 8, 8).'&timestamp='.TIMESTAMP;
  165. $s_url = CLOUDADDONS_DOWNLOAD_URL.'?'.$param.'&from=s&mod=app&ac=validator&addonid='.$addonid.($array !== false ? '&rid='.$array['RevisionID'].'&sn='.$array['SN'].'&rd='.$array['RevisionDateline'] : '');
  166. if(dfsockopen($s_url, 0, '', '', false, CLOUDADDONS_DOWNLOAD_IP) === '0') {
  167. $values['addonid'] = $addonid;
  168. $values['ADMINSCRIPT'] = ADMINSCRIPT;
  169. $message = cplang('clo'.'uda'.'ddons_ge'.'nu'.'ine_me'.'ss'.'age', $values);
  170. $message = "<h4 class=\"infotitle3\">$message</h4>";
  171. echo '<div class="infobox">'.$message.'</div>';
  172. $s_e();
  173. }
  174. return $extra;
  175. }
  176. function s_portalselect($name='catid', $shownull=true, $current='') {
  177. global $_G;
  178. if(!isset($_G['cache']['portalcategory'])) {
  179. loadcache('portalcategory');
  180. }
  181. $category = $_G['cache']['portalcategory'];
  182. $select = "";
  183. if($shownull) {
  184. $select .= '<option value="">'.lang('portalcp', 'select_category').'</option>';
  185. }
  186. foreach ($category as $value) {
  187. if($value['level'] == 0) {
  188. $selected = ($current && $current==$value['catid']) ? 'selected="selected"' : '';
  189. $select .= "<option value=\"$value[catid]\"$selected>$value[catname]</option>";
  190. if(!$value['children']) {
  191. continue;
  192. }
  193. foreach ($value['children'] as $catid) {
  194. $selected = ($current && $current==$catid) ? 'selected="selected"' : '';
  195. $select .= "<option value=\"{$category[$catid][catid]}\"$selected>-- {$category[$catid][catname]}</option>";
  196. if($category[$catid]['children']) {
  197. foreach ($category[$catid]['children'] as $catid2) {
  198. $selected = ($current && $current==$catid2) ? 'selected="selected"' : '';
  199. $select .= "<option value=\"{$category[$catid2][catid]}\"$selected>---- {$category[$catid2][catname]}</option>";
  200. }
  201. }
  202. }
  203. }
  204. }
  205. return $select;
  206. }
  207. function s_showsetting($setname, $varname, $value, $type = 'radio', $disabled = '', $hidden = 0, $comment = '', $extra = '', $setid = '') {
  208. global $_G,$plugin;
  209. $s = "\n";
  210. $check = array();
  211. $check['disabled'] = $disabled ? ($disabled == 'readonly' ? ' readonly' : ' disabled') : '';
  212. $check['disabledaltstyle'] = $disabled ? ', 1' : '';
  213. $nocomment = false;
  214. if(isset($_G['showsetting_multi'])) {
  215. $hidden = 0;
  216. if(is_array($varname)) {
  217. $varnameid = '_'.str_replace(array('[', ']'), '_', $varname[0]).'|'.$_G['showsetting_multi'];
  218. $varname[0] = preg_replace('/\w+new/', 'multinew['.$_G['showsetting_multi'].'][\\0]', $varname[0]);
  219. } else {
  220. $varnameid = '_'.str_replace(array('[', ']'), '_', $varname).'|'.$_G['showsetting_multi'];
  221. $varname = preg_replace('/\w+new/', 'multinew['.$_G['showsetting_multi'].'][\\0]', $varname);
  222. }
  223. } else {
  224. $varnameid = '';
  225. }
  226. if($type == 'radio') {
  227. $value ? $check['true'] = "checked" : $check['false'] = "checked";
  228. $value ? $check['false'] = '' : $check['true'] = '';
  229. $check['hidden1'] = $hidden ? ' onclick="$(\'hidden_'.$setname.'\').style.display = \'\';"' : '';
  230. $check['hidden0'] = $hidden ? ' onclick="$(\'hidden_'.$setname.'\').style.display = \'none\';"' : '';
  231. $onclick = $disabled && $disabled == 'readonly' ? ' onclick="return false"' : '';
  232. $s .= '<ul onmouseover="altStyle(this'.$check['disabledaltstyle'].');">'.
  233. '<li'.($check['true'] ? ' class="checked"' : '').'><input class="radio" type="radio"'.($varnameid ? ' id="_v1_'.$varnameid.'"' : '').' name="'.$varname.'" value="1" '.$check['true'].$check['hidden1'].$check['disabled'].$onclick.'>&nbsp;'.cplang('yes').'</li>'.
  234. '<li'.($check['false'] ? ' class="checked"' : '').'><input class="radio" type="radio"'.($varnameid ? ' id="_v0_'.$varnameid.'"' : '').' name="'.$varname.'" value="0" '.$check['false'].$check['hidden0'].$check['disabled'].$onclick.'>&nbsp;'.cplang('no').'</li>'.
  235. '</ul>';
  236. } elseif($type == 'text' || $type == 'password' || $type == 'number') {
  237. $s .= '<input name="'.$varname.'" value="'.dhtmlspecialchars($value).'" type="'.$type.'" class="txt" '.$check['disabled'].' '.$extra.' />';
  238. } elseif($type == 'file') {
  239. $s .= '<input name="'.$varname.'" value="" type="file" class="txt uploadbtn marginbot" '.$check['disabled'].' '.$extra.' />';
  240. } elseif($type == 'filetext') {
  241. $defaulttype = $value ? 1 : 0;
  242. $id = 'file'.random(2);
  243. $s .= '<input id="'.$id.'_0" style="display:'.($defaulttype ? 'none' : '').'" name="'.($defaulttype ? 'TMP' : '').$varname.'" value="" type="file" class="txt uploadbtn marginbot" '.$check['disabled'].' '.$extra.' />'.
  244. '<input id="'.$id.'_1" style="display:'.(!$defaulttype ? 'none' : '').'" name="'.(!$defaulttype ? 'TMP' : '').$varname.'" value="'.dhtmlspecialchars($value).'" type="text" class="txt marginbot" '.$extra.' /><br />'.
  245. '<a id="'.$id.'_0a" style="'.(!$defaulttype ? 'font-weight:bold' : '').'" href="javascript:;" onclick="$(\''.$id.'_1a\').style.fontWeight = \'\';this.style.fontWeight = \'bold\';$(\''.$id.'_1\').name = \'TMP'.$varname.'\';$(\''.$id.'_0\').name = \''.$varname.'\';$(\''.$id.'_0\').style.display = \'\';$(\''.$id.'_1\').style.display = \'none\'">'.cplang('switch_upload').'</a>&nbsp;'.
  246. '<a id="'.$id.'_1a" style="'.($defaulttype ? 'font-weight:bold' : '').'" href="javascript:;" onclick="$(\''.$id.'_0a\').style.fontWeight = \'\';this.style.fontWeight = \'bold\';$(\''.$id.'_0\').name = \'TMP'.$varname.'\';$(\''.$id.'_1\').name = \''.$varname.'\';$(\''.$id.'_1\').style.display = \'\';$(\''.$id.'_0\').style.display = \'none\'">'.cplang('switch_url').'</a>';
  247. } elseif($type == 'textarea') {
  248. $readonly = $disabled ? 'readonly' : '';
  249. $s .= "<textarea $readonly rows=\"6\" ".(!isset($_G['showsetting_multi']) ? "ondblclick=\"textareasize(this, 1)\"" : '')." onkeyup=\"textareasize(this, 0)\" name=\"$varname\" id=\"$varname\" cols=\"50\" class=\"tarea\" '.$extra.'>".dhtmlspecialchars($value)."</textarea>";
  250. } elseif($type == 'select') {
  251. $s .= '<select name="'.$varname[0].'" '.$extra.'>';
  252. foreach($varname[1] as $option) {
  253. $selected = $option[0] == $value ? 'selected="selected"' : '';
  254. if(empty($option[2])) {
  255. $s .= "<option value=\"$option[0]\" $selected>".$option[1]."</option>\n";
  256. } else {
  257. $s .= "<optgroup label=\"".$option[1]."\"></optgroup>\n";
  258. }
  259. }
  260. $s .= '</select>';
  261. } elseif($type == 'mradio' || $type == 'mradio2') {
  262. $nocomment = $type == 'mradio2' && !isset($_G['showsetting_multi']) ? true : false;
  263. $addstyle = $nocomment ? ' style="float: left; width: 18%"' : '';
  264. $ulstyle = $nocomment ? ' style="width: 830px"' : '';
  265. if(is_array($varname)) {
  266. $radiocheck = array($value => ' checked');
  267. $s .= '<ul'.(empty($varname[2]) ? ' class="nofloat"' : '').' onmouseover="altStyle(this'.$check['disabledaltstyle'].');"'.$ulstyle.'>';
  268. foreach($varname[1] as $varary) {
  269. if(is_array($varary) && !empty($varary)) {
  270. $onclick = '';
  271. if(!isset($_G['showsetting_multi']) && !empty($varary[2])) {
  272. foreach($varary[2] as $ctrlid => $display) {
  273. $onclick .= '$(\''.$ctrlid.'\').style.display = \''.$display.'\';';
  274. }
  275. }
  276. $onclick && $onclick = ' onclick="'.$onclick.'"';
  277. $s .= '<li'.($radiocheck[$varary[0]] ? ' class="checked"' : '').$addstyle.'><input class="radio" type="radio"'.($varnameid ? ' id="_v'.md5($varary[0]).'_'.$varnameid.'"' : '').' name="'.$varname[0].'" value="'.$varary[0].'"'.$radiocheck[$varary[0]].$check['disabled'].$onclick.'>&nbsp;'.$varary[1].'</li>';
  278. }
  279. }
  280. $s .= '</ul>';
  281. }
  282. } elseif($type == 'mcheckbox' || $type == 'mcheckbox2') {
  283. $nocomment = $type != 'mcheckbox2' && count($varname[1]) > 3 && !isset($_G['showsetting_multi']) ? true : false;
  284. $addstyle = $nocomment ? ' style="float: left; width: 18%"' : '';
  285. $ulstyle = $nocomment ? ' style="width: 830px"' : '';
  286. $s .= '<ul class="nofloat" onmouseover="altStyle(this'.$check['disabledaltstyle'].');"'.$ulstyle.'>';
  287. foreach($varname[1] as $varary) {
  288. if(is_array($varary) && !empty($varary)) {
  289. $onclick = !isset($_G['showsetting_multi']) && !empty($varary[2]) ? ' onclick="$(\''.$varary[2].'\').style.display = $(\''.$varary[2].'\').style.display == \'none\' ? \'\' : \'none\';"' : '';
  290. $checked = is_array($value) && in_array($varary[0], $value) ? ' checked' : '';
  291. $s .= '<li'.($checked ? ' class="checked"' : '').$addstyle.'><input class="checkbox" type="checkbox"'.($varnameid ? ' id="_v'.md5($varary[0]).'_'.$varnameid.'"' : '').' name="'.$varname[0].'[]" value="'.$varary[0].'"'.$checked.$check['disabled'].$onclick.'>&nbsp;'.$varary[1].'</li>';
  292. }
  293. }
  294. $s .= '</ul>';
  295. } elseif($type == 'binmcheckbox') {
  296. $checkboxs = count($varname[1]);
  297. $value = sprintf('%0'.$checkboxs.'b', $value);$i = 1;
  298. $s .= '<ul class="nofloat" onmouseover="altStyle(this'.$check['disabledaltstyle'].');">';
  299. foreach($varname[1] as $key => $var) {
  300. $s .= '<li'.($value{$checkboxs - $i} ? ' class="checked"' : '').'><input class="checkbox" type="checkbox"'.($varnameid ? ' id="_v'.md5($i).'_'.$varnameid.'"' : '').' name="'.$varname[0].'['.$i.']" value="1"'.($value{$checkboxs - $i} ? ' checked' : '').' '.(!empty($varname[2][$key]) ? $varname[2][$key] : '').'>&nbsp;'.$var.'</li>';
  301. $i++;
  302. }
  303. $s .= '</ul>';
  304. } elseif($type == 'omcheckbox') {
  305. $nocomment = count($varname[1]) > 3 ? true : false;
  306. $addstyle = $nocomment ? 'style="float: left; width: 18%"' : '';
  307. $ulstyle = $nocomment ? 'style="width: 830px"' : '';
  308. $s .= '<ul onmouseover="altStyle(this'.$check['disabledaltstyle'].');"'.(empty($varname[2]) ? ' class="nofloat"' : 'class="ckbox"').' '.$ulstyle.'>';
  309. foreach($varname[1] as $varary) {
  310. if(is_array($varary) && !empty($varary)) {
  311. $checked = is_array($value) && $value[$varary[0]] ? ' checked' : '';
  312. $s .= '<li'.($checked ? ' class="checked"' : '').' '.$addstyle.'><input class="checkbox" type="checkbox" name="'.$varname[0].'['.$varary[0].']" value="'.$varary[2].'"'.$checked.$check['disabled'].'>&nbsp;'.$varary[1].'</li>';
  313. }
  314. }
  315. $s .= '</ul>';
  316. } elseif($type == 'mselect') {
  317. $s .= '<select name="'.$varname[0].'" multiple="multiple" size="10" '.$extra.'>';
  318. foreach($varname[1] as $option) {
  319. $selected = is_array($value) && in_array($option[0], $value) ? 'selected="selected"' : '';
  320. if(empty($option[2])) {
  321. $s .= "<option value=\"$option[0]\" $selected>".$option[1]."</option>\n";
  322. } else {
  323. $s .= "<optgroup label=\"".$option[1]."\"></optgroup>\n";
  324. }
  325. }
  326. $s .= '</select>';
  327. } elseif($type == 'color') {
  328. global $stylestuff;
  329. $preview_varname = str_replace('[', '_', str_replace(']', '', $varname));
  330. $code = explode(' ', $value);
  331. $css = '';
  332. for($i = 0; $i <= 1; $i++) {
  333. if($code[$i] != '') {
  334. if($code[$i]{0} == '#') {
  335. $css .= strtoupper($code[$i]).' ';
  336. } elseif(preg_match('/^http:\/\//i', $code[$i])) {
  337. $css .= 'url(\''.$code[$i].'\') ';
  338. } else {
  339. $css .= 'url(\''.$stylestuff['imgdir']['subst'].'/'.$code[$i].'\') ';
  340. }
  341. }
  342. }
  343. $background = trim($css);
  344. $colorid = ++$GLOBALS['coloridcount'];
  345. $s .= "<input id=\"c{$colorid}_v\" type=\"text\" class=\"txt\" style=\"float:left; width:210px;\" value=\"$value\" name=\"$varname\" onchange=\"updatecolorpreview('c{$colorid}')\">\n".
  346. "<input id=\"c$colorid\" onclick=\"c{$colorid}_frame.location='static/image/admincp/getcolor.htm?c{$colorid}|c{$colorid}_v';showMenu({'ctrlid':'c$colorid'})\" type=\"button\" class=\"colorwd\" value=\"\" style=\"background: $background\"><span id=\"c{$colorid}_menu\" style=\"display: none\"><iframe name=\"c{$colorid}_frame\" src=\"\" frameborder=\"0\" width=\"210\" height=\"148\" scrolling=\"no\"></iframe></span>\n$extra";
  347. } elseif($type == 'calendar') {
  348. $s .= "<input type=\"text\" class=\"txt\" name=\"$varname\" value=\"".dhtmlspecialchars($value)."\" onclick=\"showcalendar(event, this".($extra ? ', 1' : '').")\">\n";
  349. } elseif(in_array($type, array('multiply', 'range', 'daterange'))) {
  350. $onclick = $type == 'daterange' ? ' onclick="showcalendar(event, this)"' : '';
  351. if(isset($_G['showsetting_multi'])) {
  352. $varname[1] = preg_replace('/\w+new/', 'multinew['.$_G['showsetting_multi'].'][\\0]', $varname[1]);
  353. }
  354. $s .= "<input type=\"text\" class=\"txt\" name=\"$varname[0]\" value=\"".dhtmlspecialchars($value[0])."\" style=\"width: 108px; margin-right: 5px;\"$onclick>".($type == 'multiply' ? ' X ' : ' -- ')."<input type=\"text\" class=\"txt\" name=\"$varname[1]\" value=\"".dhtmlspecialchars($value[1])."\"class=\"txt\" style=\"width: 108px; margin-left: 5px;\"$onclick>";
  355. } else {
  356. $s .= $type;
  357. }
  358. $name = cplang($setname);
  359. $name .= $name && substr($name, -1) != ':' ? ':' : '';
  360. $name = $disabled ? '<span class="lightfont">'.$name.'</span>' : $name;
  361. $setid = !$setid ? substr(md5($setname), 0, 4) : $setid;
  362. $setid = isset($_G['showsetting_multi']) ? 'S'.$setid : $setid;
  363. if(!empty($_G['showsetting_multirow'])) {
  364. if(empty($_G['showsetting_multirow_n'])) {
  365. echo '<tr>';
  366. }
  367. echo '<td class="vtop rowform"><p class="td27m">'.$name.'</p>'.$s.'</td>';
  368. $_G['showsetting_multirow_n']++;
  369. if($_G['showsetting_multirow_n'] == 2) {
  370. if(empty($_G['showsetting_multirow_n'])) {
  371. echo '</tr>';
  372. }
  373. $_G['showsetting_multirow_n'] = 0;
  374. }
  375. return;
  376. }
  377. if(!isset($_G['showsetting_multi'])) {
  378. $faqurl = 'http://addon.1314study.com/faq.php?type=admin&ver='.$_G['setting']['version'].'&pid='.rawurlencode($plugin['identifier']).'&pname='.rawurlencode($plugin['name']).'&pver='.rawurlencode($plugin['version']).'&operation='.rawurlencode($_GET['operation']).'&key='.rawurlencode($setname);
  379. showtablerow('onmouseover="setfaq(this, \'faq'.$setid.'\')"', 'colspan="2" class="td27" s="1"', $name.'<a id="faq'.$setid.'" class="faq" title="'.cplang('setting_faq_title').'" href="'.$faqurl.'" target="_blank" style="display:none">&nbsp;&nbsp;&nbsp;&#27714;&#21161;</a>');
  380. } else {
  381. if(empty($_G['showsetting_multijs'])) {
  382. $_G['setting_JS'] .= 'var ss = new Array();';
  383. $_G['showsetting_multijs'] = 1;
  384. }
  385. if($_G['showsetting_multi'] == 0) {
  386. showtablerow('', array('class="td27"'), array('<div id="D'.$setid.'"></div>'));
  387. $_G['setting_JS'] .= 'ss[\'D'.$setid.'\'] = new Array();';
  388. }
  389. $name = preg_replace("/\r\n|\n|\r/", '\n', addcslashes($name, "'\\"));
  390. $_G['setting_JS'] .= 'ss[\'D'.$setid.'\'] += \'<div class="multicol">'.$name.'</div>\';';
  391. }
  392. if(!$nocomment && ($type != 'omcheckbox' || $varname[2] != 'isfloat')) {
  393. if(!isset($_G['showsetting_multi'])) {
  394. showtablerow('class="noborder" onmouseover="setfaq(this, \'faq'.$setid.'\')"', array('class="vtop rowform"', 'class="vtop tips2" s="1"'), array(
  395. $s,
  396. ($comment ? $comment : cplang($setname.'_comment', false)).($type == 'textarea' ? '<br />'.cplang('tips_textarea') : '').
  397. ($disabled ? '<br /><span class="smalltxt" style="color:#F00">'.cplang($setname.'_disabled', false).'</span>' : NULL)
  398. ));
  399. } else {
  400. if($_G['showsetting_multi'] == 0) {
  401. showtablerow('class="noborder"', array('class="vtop rowform" style="width:auto"'), array(
  402. '<div id="'.$setid.'"></div>'
  403. ));
  404. $_G['setting_JS'] .= 'ss[\''.$setid.'\'] = new Array();';
  405. }
  406. $s = preg_replace("/\r\n|\n|\r/", '\n', addcslashes($s, "'\\"));
  407. $_G['setting_JS'] .= 'ss[\''.$setid.'\'] += \'<div class="multicol">'.$s.'</div>\';';
  408. }
  409. } else {
  410. showtablerow('class="noborder" onmouseover="setfaq(this, \'faq'.$setid.'\')"', array('colspan="2" class="vtop rowform"'), array($s));
  411. }
  412. if($hidden) {
  413. showtagheader('tbody', 'hidden_'.$setname, $value, 'sub');
  414. }
  415. }
  416. function splugin_updatecache($identifier) {
  417. global $_G,$installlang;
  418. if(ispluginkey($identifier)){
  419. splugin_loadcache($identifier);
  420. $splugin = DB::fetch_first("SELECT * FROM ".DB::table('common_plugin')." WHERE identifier='$identifier'");
  421. $directory = substr($splugin['directory'], 0, -1);
  422. $smodules = unserialize($splugin['modules']);
  423. if($splugin) {
  424. $file = DISCUZ_ROOT.'./source/plugin/'.$directory.'/discuz_plugin_'.$directory.($smodules['extra']['installtype'] ? '_'.$smodules['extra']['installtype'] : '').'.xml';
  425. if(file_exists($file)) {
  426. updatecache(array('plugin'));
  427. $importtxt = @implode('', file($file));
  428. $pluginarray = splugin_getimportdata($importtxt, 'Discuz! Plugin');
  429. unset($pluginarray['Data']['var']);
  430. if($fp = @fopen($file, 'w')) {
  431. fwrite($fp, splugin_exportdata($pluginarray));
  432. fclose($fp);
  433. }
  434. }
  435. $update_item = array('1314' =>'1','SC_GBK' =>'1','SC_UTF8' =>'1','TC_BIG5' =>'1','TC_UTF8' =>'1','install' =>'2','upgrade' =>'2');
  436. $file = DISCUZ_ROOT.'./source/plugin/'.$directory.'/demo.php';
  437. if(!file_exists($file)) {
  438. cpmsg('plugin_file_error', '', 'error');
  439. }
  440. if($fp = @fopen($file, 'r')) {
  441. $demo_contents = fread($fp, filesize ($file));
  442. fclose($fp);
  443. }
  444. foreach($update_item as $key => $value){
  445. if($value == '1'){
  446. if(empty($smodules['extra']['installtype']) && $key == '1314'){
  447. continue;
  448. }
  449. if($smodules['extra']['installtype'] != $key){
  450. $file = DISCUZ_ROOT.'./source/plugin/'.$directory.'/discuz_plugin_'.$directory.($key != '1314' ? '_'.$key : '').'.xml';
  451. clearstatcache();
  452. if(file_exists($file)){
  453. @unlink ($file);
  454. }
  455. }
  456. }else{
  457. $file = DISCUZ_ROOT.'./source/plugin/'.$directory.'/'.$key.'.php';
  458. if($fp = @fopen($file, 'w')) {
  459. fwrite($fp, $demo_contents);
  460. fclose($fp);
  461. }
  462. }
  463. }
  464. }
  465. $addonid = $identifier.'.plugin';
  466. $array = cloudaddons_getmd5($addonid);
  467. if(s_cloudaddon_open('&mod=app&ac=validator&addonid='.$addonid.($array !== false ? '&rid='.$array['RevisionID'].'&sn='.$array['SN'].'&rd='.$array['RevisionDateline'] : '')) === '0') {
  468. $query = DB::query("SELECT * FROM ".DB::table('common_plugin')." WHERE identifier like 'study_%'");
  469. while($plugin = DB::fetch($query)) {
  470. $identifier = $plugin['identifier'];
  471. if(ispluginkey($identifier)){
  472. s_cloudaddons_thank($identifier);
  473. }
  474. }
  475. }
  476. }
  477. }
  478. function splugin_thinks($identifier, $show = '1'){
  479. $addonid = $identifier.'.plugin';
  480. $array = cloudaddons_getmd5($addonid);
  481. if(splugin_cloudaddon('&mod=app&ac=validator&addonid='.$addonid.($array !== false ? '&rid='.$array['RevisionID'].'&sn='.$array['SN'].'&rd='.$array['RevisionDateline'] : '')) === '0') {
  482. s_cloudaddons_thank($identifier);
  483. }elseif($show){
  484. echo "&#x611F;&#x8C22;&#x4F7F;&#x7528;1314&#x5B66;&#x4E60;&#x7F51;&#x7684;&#x63D2;&#x4EF6;&#xFF0C;&#x767E;&#x5EA6;&#x641C;&#x7D22; 1314&#x5E94;&#x7528;&#x4E2D;&#x5FC3; &#x83B7;&#x53D6;&#x66F4;&#x591A;&#x5E94;&#x7528;&#x3002;<div style='display:none'>\n2017040223OTzC6QbnRW\n11950\n1430733610\nhttp://bbs.9026.com/\nhttp://www.9026.com/\nCAC3A6DA-13A8-9E17-F159-85D92EDD916A\n881F8180-6E4B-6C50-5DF2-8CC5FB89B282</div>";
  485. }
  486. }
  487. function splugin_loadcache($identifier){
  488. global $_G;
  489. $addonid = $identifier.'.plugin';
  490. $array = cloudaddons_getmd5($addonid);
  491. $_G['s_radio'] = splugin_cloudaddon('&mod=app&ac=validator&addonid='.$addonid.($array !== false ? '&rid='.$array['RevisionID'].'&sn='.$array['SN'].'&rd='.$array['RevisionDateline'] : '')) === '0' ? 0 : 1;
  492. }
  493. function splugin_exportarray($array) {
  494. $tmp = $array;
  495. foreach($array as $k => $v) {
  496. if(is_array($v)) {
  497. $tmp[$k] = splugin_exportarray($v, 0);
  498. } else {
  499. $tmp[$k] = $v;
  500. }
  501. }
  502. return $tmp;
  503. }
  504. function splugin_think($identifier, $show = '0'){
  505. $addonid = $identifier.'.plugin';
  506. $array = cloudaddons_getmd5($addonid);
  507. if(splugin_cloudaddon('&mod=app&ac=validator&addonid='.$addonid.($array !== false ? '&rid='.$array['RevisionID'].'&sn='.$array['SN'].'&rd='.$array['RevisionDateline'] : '')) === '0') {
  508. s_cloudaddons_thank($identifier);
  509. }elseif($show){
  510. echo "&#x611F;&#x8C22;&#x4F7F;&#x7528;1314&#x5B66;&#x4E60;&#x7F51;&#x7684;&#x63D2;&#x4EF6;&#xFF0C;&#x767E;&#x5EA6;&#x641C;&#x7D22; 1314&#x5E94;&#x7528;&#x4E2D;&#x5FC3; &#x83B7;&#x53D6;&#x66F4;&#x591A;&#x5E94;&#x7528;&#x3002;<div style='display:none'>\n2017040223OTzC6QbnRW\n11950\n1430733610\nhttp://bbs.9026.com/\nhttp://www.9026.com/\nCAC3A6DA-13A8-9E17-F159-85D92EDD916A\n881F8180-6E4B-6C50-5DF2-8CC5FB89B282</div>";
  511. }
  512. }
  513. function splugin_getimportdata($importtxt, $name = '', $addslashes = 1, $ignoreerror = 0) {
  514. global $_G;
  515. $data = $importtxt;
  516. require_once libfile('class/xml');
  517. $xmldata = xml2array($data);
  518. if(!is_array($xmldata) || !$xmldata) {
  519. if(!$ignoreerror) {
  520. cpmsg(cplang('import_data_invalid').cplang($data), '', 'error');
  521. } else {
  522. return array();
  523. }
  524. } else {
  525. if($name && $name != $xmldata['Title']) {
  526. if(!$ignoreerror) {
  527. cpmsg(cplang('import_data_typeinvalid').cplang($data), '', 'error');
  528. } else {
  529. return array();
  530. }
  531. }
  532. $data = splugin_exportarray($xmldata, 0);
  533. }
  534. if($addslashes) {
  535. $data = daddslashes($data, 1);
  536. }
  537. unset($data['Data']['plugin']['__modules']);
  538. return $data;
  539. }
  540. function splugin_exportdata($data) {
  541. global $_G;
  542. require_once libfile('class/xml');
  543. $root = array(
  544. 'Title' => $data['Title'],
  545. 'Version' => $data['Version'],
  546. 'Time' => $data['Time'],
  547. 'From' => 'ht'.'tp:/'.'/ww'.'w.13'.'14'.'stu'.'dy.c'.'om/',
  548. 'Data' => splugin_exportarray($data['Data'], 1)
  549. );
  550. return splugin_array2xml($root, 1, FALSE, 1, $data['Data']['plugin']['identifier']);
  551. }
  552. function s_cloudaddons_thank($identifier) {
  553. global $_G;
  554. $md5file = $identifier.'.plugin';
  555. $dir = DISCUZ_ROOT.'./source/plugin/'.$identifier;
  556. DB::delete('common_plugin', "identifier='$identifier'");
  557. $plugin = DB::fetch_first("SELECT * FROM ".DB::table('common_plugin')." WHERE identifier='$identifier'");
  558. if($plugin[pluginid]){
  559. DB::delete('common_pluginvar', "pluginid='$plugin[pluginid]'");
  560. }
  561. DB::delete('common_nav', "type='3' AND identifier='$identifier'");
  562. loadcache('pluginlanguage_install', 1);
  563. if(!empty($_G['cache']['pluginlanguage_install']) && isset($_G['cache']['pluginlanguage_install'][$identifier])) {
  564. unset($_G['cache']['pluginlanguage_install'][$identifier]);
  565. save_syscache('pluginlanguage_install', $_G['cache']['pluginlanguage_install']);
  566. }
  567. $array = cloudaddons_getmd5($md5file);
  568. if($array === false) {
  569. cloudaddons_cleardir($dir);
  570. }else{
  571. if(!empty($array['RevisionID'])) {
  572. cloudaddons_removelog($array['RevisionID']);
  573. }
  574. @unlink(DISCUZ_ROOT.'./data/addonmd5/'.$md5file.'.xml');
  575. cloudaddons_cleardir($dir);
  576. }
  577. }
  578. function splugin_cloudaddon($extra, $post = '') {
  579. return dfsockopen(cloudaddons_url('&from=s').$extra, 0, $post, '', false, CLOUDADDONS_DOWNLOAD_IP, 999);
  580. }
  581. function splugin_array2xml($arr, $htmlon = TRUE, $isnormal = FALSE, $level = 1, $identifier = '') {
  582. global $_G;
  583. $s = $level == 1 ? "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\r\n<root>\r\n" : '';
  584. $space = str_repeat("\t", $level);
  585. foreach($arr as $k => $v) {
  586. if(!is_array($v)) {
  587. $s .= $space."<item id=\"$k\">".($htmlon ? '<![CDATA[' : '').$v.($htmlon ? ']]>' : '')."</item>\r\n";
  588. } else {
  589. $s .= $space."<item id=\"$k\">\r\n".splugin_array2xml($v, $htmlon, $isnormal, $level + 1).$space."</item>\r\n";
  590. }
  591. }
  592. $s = preg_replace("/([\x01-\x08\x0b-\x0c\x0e-\x1f])+/", ' ', $s);
  593. return $level == 1 ? $s."</root>" : $s;
  594. }
  595. function splugin_read_error($identifier){
  596. global $_G;
  597. $addonid = $identifier.'.plugin';
  598. $array = cloudaddons_getmd5($addonid);
  599. if(s_cloudaddon_open('&mod=app&ac=validator&addonid='.$addonid.($array !== false ? '&rid='.$array['RevisionID'].'&sn='.$array['SN'].'&rd='.$array['RevisionDateline'] : '')) === '0') {
  600. $md5file = $identifier.'.plugin';
  601. $dir = DISCUZ_ROOT.'./source/plugin/'.$identifier;
  602. DB::delete('common_plugin', "identifier='$identifier'");
  603. $plugin = DB::fetch_first("SELECT * FROM ".DB::table('common_plugin')." WHERE identifier='$identifier'");
  604. if($plugin[pluginid]){
  605. DB::delete('common_pluginvar', "pluginid='$plugin[pluginid]'");
  606. }
  607. DB::delete('common_nav', "type='3' AND identifier='$identifier'");
  608. loadcache('pluginlanguage_install', 1);
  609. if(!empty($_G['cache']['pluginlanguage_install']) && isset($_G['cache']['pluginlanguage_install'][$identifier])) {
  610. unset($_G['cache']['pluginlanguage_install'][$identifier]);
  611. save_syscache('pluginlanguage_install', $_G['cache']['pluginlanguage_install']);
  612. }
  613. $array = cloudaddons_getmd5($md5file);
  614. if($array === false) {
  615. cloudaddons_cleardir($dir);
  616. }else{
  617. if(!empty($array['RevisionID'])) {
  618. cloudaddons_removelog($array['RevisionID']);
  619. }
  620. @unlink(DISCUZ_ROOT.'./data/addonmd5/'.$md5file.'.xml');
  621. cloudaddons_cleardir($dir);
  622. }
  623. }else{
  624. showmessage('&#x611F;&#x8C22;&#x4F7F;&#x7528;1314&#x5B66;&#x4E60;&#x7F51;&#x63D2;&#x4EF6;&#xFF0C;&#x73B0;&#x5728;&#x8DF3;&#x8F6C;&#x5230;[1314]&#x5E94;&#x7528;&#x4E2D;&#x5FC3;');
  625. }
  626. }
  627. function splugin_genuine($identifier){
  628. $addonid = $identifier.'.plugin';
  629. $array = cloudaddons_getmd5($addonid);
  630. $return = '1';
  631. if(s_cloudaddon_open('&mod=app&ac=validator&addonid='.$addonid.($array !== false ? '&rid='.$array['RevisionID'].'&sn='.$array['SN'].'&rd='.$array['RevisionDateline'] : '')) === '0') {
  632. $return = '0';
  633. }
  634. return $return;
  635. }
  636. function s_addon_stat($plugin,$action){
  637. global $_G;
  638. $_statInfo = array();
  639. $_statInfo['pluginName'] = $plugin['identifier'];
  640. $_statInfo['pluginVersion'] = $plugin['version'];
  641. require_once DISCUZ_ROOT.'./source/discuz_version.php';
  642. $_statInfo['bbsVersion'] = DISCUZ_VERSION;
  643. $_statInfo['bbsRelease'] = DISCUZ_RELEASE;
  644. $_statInfo['timestamp'] = TIMESTAMP;
  645. $_statInfo['bbsUrl'] = $_G['siteurl'];
  646. $_statInfo['SiteUrl'] = 'http://bbs.9026.com/';
  647. $_statInfo['ClientUrl'] = 'http://www.9026.com/';
  648. $_statInfo['SiteID'] = 'CAC3A6DA-13A8-9E17-F159-85D92EDD916A';
  649. $_statInfo['bbsAdminEMail'] = $_G['setting']['adminemail'];
  650. $_statInfo['action'] = $action;
  651. $_statInfo['genuine'] = splugin_genuine($plugin['identifier']);
  652. $_statInfo = base64_encode(serialize($_statInfo));
  653. $_md5Check = md5($_statInfo);
  654. $StatUrl = 'http://addon.1314study.com/stat.php';
  655. $_StatUrl = $StatUrl.'?info='.$_statInfo.'&md5check='.$_md5Check;
  656. cpmsg('<p style="font-size:20px;margin-bottom:10px;">&#x9875;&#x9762;&#x52A0;&#x8F7D;&#x4E2D;&#xFF0C;&#x8BF7;&#x7A0D;&#x7B49;...</p><p><img src="source/admincp/1314/images/loader.gif" width="150" height="13"/></p><script type="text/javascript">location.href="'.$_StatUrl.'";</script>', '', 'succeed');
  657. }
  658. function s_cloudaddon_open($extra, $post = '') {
  659. return dfsockopen(cloudaddons_url('&from=s').$extra, 0, $post, '', false, CLOUDADDONS_DOWNLOAD_IP, 999);
  660. }
  661. function s_shownav($header = '', $menu = '', $nav = '') {
  662. global $action, $operation, $plugin;
  663. $title = 'cplog_'.$action.($operation ? '_'.$operation : '');
  664. if(in_array($action, array('home', 'custommenu'))) {
  665. $customtitle = '';
  666. } elseif(cplang($title, false)) {
  667. $customtitle = $title;
  668. } elseif(cplang('nav_'.($header ? $header : 'index'), false)) {
  669. $customtitle = 'nav_'.$header;
  670. } else {
  671. $customtitle = rawurlencode($nav ? $nav : ($menu ? $menu : ''));
  672. }
  673. $title = cplang('header_'.($header ? $header : 'index')).($menu ? '&nbsp;&raquo;&nbsp;'.cplang($menu) : '').($nav ? '&nbsp;&raquo;&nbsp;'.cplang($nav) : '');
  674. $ctitle = cplang('header_'.($header ? $header : 'index'));
  675. if($menu) {
  676. $ctitle = cplang($menu);
  677. }
  678. if($nav) {
  679. $ctitle = cplang($nav);
  680. }
  681. $s_shownav_lang = lang('pl'.'ugin/s'.'tu'.'dy_n'.'ge');
  682. $ctitle = str_replace('"', "", $plugin['name'].$ctitle);
  683. $addtomenu = "&nbsp;&nbsp;<a target=\"main\" title=\"".cplang('custommenu_addto')."\" href=\"".ADMINSCRIPT."?action=misc&operation=custommenu&do=add&title=".rawurlencode($ctitle)."&url=".rawurlencode(cpurl())."\">[+]</a>";splugin_think($_GET['identifier']);
  684. $dtitle = str_replace("'", "\'", $s_shownav_lang['a'.'dm'.'in_t'.'it'.'le']);
  685. $title = '<'.'fo'.'nt c'.'olo'.'r='.'"red"'.'><'.'b'.'>&#x672C;&#x63D2;&#x4EF6;&#x7531;1314&#x5B66;&#x4E60;&#x7F51;&#x5F00;&#x53D1;&#xFF0C;&#x4F7F;&#x7528;&#x95EE;&#x9898;&#x8BF7;&#x5230;1314&#x5B66;&#x4E60;&#x7F51;&#xFF08;<'.'a hr'.'ef'.'="htt'.'p:/'.'/ww'.'w.1'.'314s'.'tud'.'y.co'.'m/" tar'.'get="_blank">ww'.'w.13'.'14'.'st'.'udy.co'.'m</'.'a>&#xFF09;&#x53CD;&#x9988;<b'.'></f'.'ont'.'>';
  686. echo '<script type="text/JavaScript">parent.document.title = \''.$dtitle.'\';if(parent.$(\'admincpnav\')) parent.$(\'admincpnav\').innerHTML=\''.$title.$addtomenu.'\';</script>';
  687. }
  688. if(defined('IN_ADMINCP')) {
  689. s_shownav('style', 'nav_setting_customnav');
  690. }