⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 profilefield.php

📁 软件类别: PHP源码 / 文章管理 软件语言: 简体中文 授权方式: 商业版 文件大小: 308K
💻 PHP
字号:
<?php/*======================================================================*\|| #################################################################### |||| # VirtuaNews - 1.0.4 Pro   License ID - [WDYL-WTN]|| # ---------------------------------------------------------------- # |||| # All code in this file is ?2002 VirtuaSystems    .               # |||| # This file may not be redistributed in whole or significant part. # |||| # --------------- VIRTUANEWS IS NOT FREE SOFTWARE ---------------- # |||| # http://www.virtuanews.co.uk                                      # |||| # http://www.virtuanews.co.uk/license.php                         # |||| #################################################################### ||\*======================================================================*/if (preg_match("/(admin\/profilefield.php)/i",$PHP_SELF)) {  header("location:../admin.php");  exit;}if ($use_forum) {  adminerror("不要使用Vnews用户表格。本站当前设置为使用论坛的用户表。要编辑用户文件你必须使用论坛的管理面板。");}updateadminlog(iif($id,"id = $id",""));switch ($action) {case "profilefield":  echohtmlheader();  echotableheader("编辑文件区域",1);  echotabledescription("使用这个你在这个站能编辑、添加、删除文件区域.",1);  echotabledescription(returnlinkcode("添加文件区域","admin.php?action=profilefield_add"),1);  $tablerows = returnminitablerow("<b>标题</b>","<b>必要</b>","<b>隐藏</b>","<b>编辑表格</b>","<b>选项</b>");  $getdata = query("SELECT id,title,required,hidden,editable FROM news_profilefield ORDER BY displayorder");  while ($data_arr = fetch_array($getdata)) {    $tablerows .= returnminitablerow($data_arr[title],iif($data_arr[required],"Yes","No"),iif($data_arr[hidden],"Yes","No"),iif($data_arr[editable],"Yes","No"),returnlinkcode("编辑","admin.php?action=profilefield_edit&id=$data_arr[id]")." |".returnlinkcode("删除","admin.php?action=profilefield_delete&id=$data_arr[id]"));  }  echotabledescription("\n".returnminitable($tablerows,0,100)."    ",1);  echotablefooter();  echohtmlfooter();break;case "profilefield_add":  $temp = query_first("SELECT count(id) AS count FROM news_profilefield");  $displayorder = $temp[count] + 1;  echohtmlheader();  echoformheader("profilefield_new","添加文件区域");  echotabledescription("下面你能添加自定义文件区域, 一旦你完成添加可以按submit键保存.");  echoinputcode("标题:","title");  echoinputcode("描述:","description","",40,1);  echoinputcode("最大长度:","maxlength");  echoinputcode("区域大小:<br />Size of the input box displayed on the page","size");  echoyesnocode("必要:","required",0);  echoyesnocode("隐藏:","hidden",0);  echoyesnocode("编辑表格:","editable");  echoinputcode("显示顺序:","displayorder",$displayorder,10);  echoformfooter();  echohtmlfooter();break;case "profilefield_new":  if (($title == "") | ($maxlength == "") | ($size == "")) {    adminerror("空白栏目","所有栏目必须填写, 只有一个 <span class=\"red\">(可选)</span> 可以留空");  }  query("INSERT INTO news_profilefield VALUES (NULL,'$title','$description','$required','$hidden','$editable','$displayorder','".intval($maxlength)."','$size')");  $fieldid = getlastinsert();  query("ALTER TABLE news_userfield ADD field$fieldid VARCHAR(".intval($maxlength).") NOT NULL DEFAULT ''");  query("OPTIMIZE TABLE news_userfield");  writeallpages();  echoadminredirect("admin.php?action=profilefield");break;case "profilefield_edit":  verifyid("news_profilefield",$id);  $data_arr  = query_first("SELECT title,description,maxlength,size,required,hidden,editable,displayorder FROM news_profilefield WHERE id = $id");  echohtmlheader();  echoformheader("profilefield_update","编辑文本区域");  updatehiddenvar("id",$id);  echotabledescription("下面你能添加自定义文件区域, 一旦你完成添加可以按submit键保存.");  echoinputcode("标题:","title",$data_arr[title]);  echoinputcode("描述: <span class=\"red\">(可选)</span>","description",$data_arr[description]);  echoinputcode("最大长度:","maxlength",$data_arr[maxlength]);  echoinputcode("区域大小:<br />这页输入区域的大小","size",$data_arr[size]);  echoyesnocode("必要:","required",$data_arr[required]);  echoyesnocode("隐藏:","hidden",$data_arr[hidden]);  echoyesnocode("编辑表格:","editable",$data_arr[editable]);  echoinputcode("显示顺序:","displayorder",$data_arr[displayorder],10);  echoformfooter();  echohtmlfooter();break;case "profilefield_update":  verifyid("news_profilefield",$id);  if (($title == "") | ($maxlength == "") | ($size == "")) {    adminerror("空白栏目","所有栏目必须填写, 只有一个 <span class=\"red\">(可选)</span> 可以留空");  }  query("UPDATE news_profilefield SET title = '$title' , description = '$description' , required = '$required' , hidden = '$hidden' , editable = '$editable' , displayorder = '$displayorder' , maxlength = '".intval($maxlength)."' , size = '$size' WHERE id = $id");  query("ALTER TABLE news_userfield CHANGE field$id field$id VARCHAR(".intval($maxlength).") NOT NULL DEFAULT ''");  query("OPTIMIZE TABLE news_userfield");  writeallpages();  echoadminredirect("admin.php?action=profilefield");break;case "profilefield_delete":  verifyid("news_profilefield",$id);  echodeleteconfirm("profile field","profilefield_kill",$id);break;case "profilefield_kill":  verifyid("news_profilefield",$id);  query("DELETE FROM news_profilefield WHERE id = $id");  query("ALTER TABLE news_userfield DROP field$id");  query("OPTIMIZE TABLE news_userfield");  writeallpages();  echoadminredirect("admin.php?action=profilefield");break;default:  adminerror("无效连接","你跳转到一个无效连接");}/*======================================================================*\|| ####################################################################|| # VirtuaNews is not free software|| # Downloaded: [WDYL-WTN]|| # File: admin/profilefield.php|| ####################################################################\*======================================================================*/?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -