Example #1
0
        ) DEFAULT CHARSET=%s", $table_name, DB_CHARSET);

	$res = mysql_query($sqlstr, $proj_mysql) or sys_exit("系统忙, 请稍候再试。", $sqlstr . ":\n" . mysql_error());

	if(sizeof($poly_data) > 0)
	{
                $sqlstr = sprintf("alter table %s ", $table_name);
		foreach($poly_data as $pm_id=>$row)
		{
                	$sqlstr .= sprintf("add url_%d varchar(255),", $pm_id);
		}
		$sqlstr = substr($sqlstr, 0, strlen($sqlstr) - 1);
		$res = mysql_query($sqlstr, $proj_mysql) or sys_exit("系统忙, 请稍候再试。", $sqlstr . ":\n" . mysql_error());
	}

	sys_jmp("templist.php?p_id=$p_id");
}


$tempdef_list = "";
foreach($global_data as $kk=>$row)
{
	$tempdef_list .= sprintf("\$G{%s}\n\n", $row[name]);
}


?>

<html>
<head>
<title><?php echo $p_cname ?> -- 新建模板</title>
Example #2
0
<?php

require_once "plib/head.php";
$cgi = getCGI();
$p_id = $cgi[p_id];
$id = $cgi[id];
if ($p_id == "" || $id == "") {
    sys_exit("参数错误");
}
conProjDB($p_id);
$sqlstr = sprintf("delete from global where id={$id}", $cgi[cname], $cgi[content]);
$res = mysql_query($sqlstr, $proj_mysql) or sys_exit("系统忙, 请稍候再试。", $sqlstr . ":\n" . mysql_error());
sys_jmp("globallist.php?p_id={$p_id}");
Example #3
0
		else if($cgi[type] == "RichText")
			$this_type = "mediumblob";
		else
			$this_type = "blob";
	}
}


if($row_old[if_into_db] != $cgi[if_into_db] )
{
	if( $row_old[if_into_db] == "y")
		$sqlstr = "alter table $t_name drop $row_old[f_name]";
	else
		$sqlstr = "alter table $t_name  add $cgi[f_name]  $this_type";
	$res = mysql_query($sqlstr, $proj_mysql) or sys_exit("系统忙, 请稍候再试。", $sqlstr . ":\n" . mysql_error());
}
else if( $cgi[if_into_db] == "y" )
{
	$sqlstr = "alter table $t_name  change  $row_old[f_name] $cgi[f_name]  $this_type";
	$res = mysql_query($sqlstr, $proj_mysql) or sys_exit("系统忙, 请稍候再试。", $sqlstr . ":\n" . mysql_error());
}


$sqlstr = "update tempdef set t_id=$t_id, f_name='$cgi[f_name]', cname='$cgi[cname]', type='$cgi[type]', arithmetic='$cgi[arithmetic]', defaultvalue='$cgi[defaultvalue]', validate='$cgi[validate]', showwidth=$cgi[showwidth], showheight=$cgi[showheight], showmargin=$cgi[showmargin], hide='$cgi[hide]', ifnull='$cgi[ifnull]', if_into_db='$cgi[if_into_db]', real_type='$cgi[real_type]' where f_id=$f_id";
$res = mysql_query($sqlstr, $proj_mysql) or sys_exit("系统忙, 请稍候再试。", $sqlstr . ":\n" . mysql_error());


sys_jmp("tempdeflist.php?p_id=$p_id&t_id=$t_id");

?>
Example #4
0
<?php

require_once "plib/head.php";
$cgi = getCGI();
gsql_esc($cgi);
$p_id = $cgi[p_id];
$ids = $cgi[ids];
if ($p_id == "" || $ids == "") {
    sys_exit("参数错误");
}
conProjDB($p_id);
$sp = explode(",", $ids);
foreach ($sp as $kk => $id) {
    $name = $cgi["name{$id}"];
    $url = $cgi["url{$id}"];
    $showorder = $cgi["showorder{$id}"];
    if ($showorder == "") {
        $showorder = "0";
    }
    $sqlstr = sprintf("update navigation set name='%s', url='%s', showorder='%s' where id={$id}", $name, $url, $showorder, $id);
    print "{$sqlstr}";
    $res = mysql_query($sqlstr, $proj_mysql) or sys_exit("系统忙, 请稍候再试。", $sqlstr . ":\n" . mysql_error());
}
gen_nav();
sys_jmp("navlist.php?p_id={$p_id}");
Example #5
0
	
		$cmd = "cd $file_path; rm -f  temp_view.php; ln -s  $root_path/temp_view.php temp_view.php";
		system($cmd);

		$cmd = "cd $file_path; rm -f addmess.php; ln -s  $root_path/addmess.php addmess.php";
		system($cmd);

		$cmd = "cd $file_path;  ln -s  $root_path/plib plib";
		system($cmd);

		$cmd = "cd $file_path;  ln -s  $root_path/pagelib pagelib";
		system($cmd);
	}

	system("cd $root_path; /usr/bin/php gen_domain.php");
	sys_jmp("projlist.php");
	exit;
}

?>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo HTML_CHARSET ?>">
<meta http-equiv="Pragma" content="no-cache">
<title>修改网站</title>

<link href="css/main.css" rel="stylesheet" type="text/css" />

<script language=javascript>
var submit_flag =0;