function GetSearchAllTb() { global $empire, $dbtbpre; $file = eReturnTrueEcmsPath() . "e/data/dbcache/SearchAllTb.php"; $sql = $empire->query("select tbname,titlefield,smalltextfield from {$dbtbpre}enewssearchall_load"); while ($r = $empire->fetch($sql)) { $tbs .= "\$schalltb_r['" . $r[tbname] . "']=Array('tbname'=>'" . addslashes($r[tbname]) . "',\n'titlefield'=>'" . addslashes($r[titlefield]) . "',\n'smalltextfield'=>'" . addslashes($r[smalltextfield]) . "');\n"; } $tbs = "<?php\n//tbs\n\$schalltb_r=array();\n" . $tbs . "\n//tbs\n?>"; WriteFiletext_n($file, $tbs); }
function GetInfoFilename($classid, $id) { global $empire, $dbtbpre, $public_r, $class_r; $infor = $empire->fetch1("select isurl,groupid,classid,newspath,filename,id from {$dbtbpre}ecms_" . $class_r[$classid][tbname] . " where id='{$id}' limit 1"); if (!$infor['id'] || $infor['isurl']) { return ''; } $filetype = $infor['groupid'] ? '.php' : $class_r[$classid]['filetype']; $iclasspath = ReturnSaveInfoPath($classid, $id); $doclasspath = eReturnTrueEcmsPath() . $iclasspath; //moreport $newspath = ''; if ($infor['newspath']) { $newspath = $infor['newspath'] . '/'; } $file = $doclasspath . $newspath . $infor['filename'] . $filetype; return $file; }