webmain/system/table/tableAction.php
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
class tableClassAction extends Action
{
private $nowtablename;
public function initAction()
{
if($this->getsession('isadmin')!='1')backmsg('别乱来');
if(getconfig('systype')=='demo')backmsg('演示的不要改');
}
public function tablebefore($table)
{
$key = $this->post('key');
$where = 'and `TABLE_SCHEMA`=\''.DB_BASE.'\'';
if($key!='')$where.=" and (`TABLE_NAME` like '%$key%' or `TABLE_COMMENT` like '%$key%')";
return array(
'table' => 'information_schema.`TABLES`',
'fields'=> '`TABLE_NAME` as id,`ENGINE` as `engine`,`TABLE_ROWS` as `rows`,`TABLE_COMMENT` as `explain`,`CREATE_TIME` as `cjsj`,`UPDATE_TIME` as `gxsj`,`TABLE_COLLATION`',
'where' => $where
);
}
public function tableafter($table, $rows)
{
return array(
'dbupurl' => m('option')->getval('dbupurl')
);
}
//保存表备注
public function tablesmAjax()
{
$id = $this->post('id');
$value = $this->post('value');
$sql = "ALTER TABLE `$id` COMMENT '$value';";
$this->db->query($sql);
return 'success';
}
public function tablefieldsAjax()
{
$table = $this->post('table');
$rows = $this->db->gettablefields($table);
foreach($rows as $k=>$rs)$rows[$k]['id']=$rs['name'];
$arr['rows'] = $rows;
$this->returnjson($arr);
}
public function savefieldsAjax()
{
$table = $this->post('table');
$allfields = $this->db->getallfields($table);
$name = strtolower($this->post('name'));
if(c('check')->isincn($name))backmsg('字段名不能有中文');
$type = $this->post('type');
$dev = $this->post('dev');
$isnull = $this->post('isnull');
if($table=='' || $name=='' || $type=='')backmsg('hehe');
后面还有 112 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
