<?php #===================================================================== # Filename: admin/onepage/modify.php # Note : 单页面信息编辑 # Version : 3.0 # Author : qinggan # Update : 2008-07-13 #===================================================================== $r_url = "admin.php?file=onepage"; $id = intval($id); if (!$id) { Error("操作非法", $r_url . "&act=list"); } $C_Onepage = $CF->build("onepage"); $C_Onepage->set("condition", "id='" . $id . "'"); $rs = $C_Onepage->GetOnepage("one"); if (!$rs) { Error("找不到相关数据", $r_url . "&act=list"); } $fckeditor = FckEditor("content", FckToHtml($rs["content"]), "default", "370px", "680px"); $C_Onepage->set("condition", ""); $grouplist = $C_Onepage->GetOnegroup("all"); $TPL->p("modify", "onepage");
# Update : 2008-09-03 #============================ $C_Phpok = $CF->build("phpok"); if ($sysact == "add" || $sysact == "modify") { if ($sysact == "modify") { $id = intval($id); if (!$id) { Error("操作非法...", "admin.php?file=phpok&act=list"); } $rs = $C_Phpok->GetPhpok("one", "id='" . $id . "'"); $content = FckToHtml($rs["content"]); } else { $content = ""; $rs["status"] = 1; } $fckeditor = FckEditor("content", $content, "Default", "300px", "100%"); } elseif ($sysact == "viewok") { $r_url = "admin.php?file=phpok&act=list"; $id = intval($id); $array["subject"] = $STR->safe($subject); $STR->Set("script", true); $STR->Set("iframe", true); $STR->Set("style", true); $array["content"] = $STR->html($content); $array["status"] = intval($status); $array["sign"] = $STR->safe($sign); $tishi = "自定义代码"; if (!$id) { $tishi .= "创建"; $tishi .= $C_Phpok->SetPhpok($array) ? "成功" : "失败"; } else {