Functionsdatetime (& #36; str) & #123; & #36; strereg_replace (-, & #36; str); & #36; strsubstr (& #36; str, 5, strlen (& #36; str)-8); return & #36; str; & #125; functionreAnum (& #36; si function sdatetime ($ str ){
$ Str = ereg_replace ("-", "/", $ str );
$ Str = substr ($ str, 5, strlen ($ str)-8 );
Return $ str;
}
Function reAnum ($ sid) {//
$ DROOT = getenv ('document _ root ');
Include ("SQL. php3 ");
$ Db = MySQL (the best combination with PHP) _ connect ($ SQL ['host'], $ SQL ['user'], $ SQL ['passwd']);
$ Qsql = "SELECT id from bbs_docs where sid = '$ sid '";
$ Rs = MySQL (the best combination with PHP) _ db_query ($ SQL ['DB'], $ qsql );
Return MySQL (the best combination with PHP) _ num_rows ($ rs );
}
Function pagebar ($ pages ){
Global $ pgno;
// Global $ pages;
Global $ PHP_SELF;
Global $ aid;
Global $ OPEN_LIST;
Echo"
Previous Page
";Echo"
";
If ($ pgno! = 0 ){
$ Pu = $ pgno-1;
Echo "[]";
}
If ($ pgno <$ pages ){
$ Pd = $ pgno + 1;
Echo "[]";
}
For ($ I = 0; $ I <= $ pages; $ I ++ ){
If ($ pgno = $ I ){
Echo"";
Echo "[". ($ I + 1). "]";
Echo"";
} Else {
Echo "";
Echo "[". ($ I + 1). "]";
Echo "";
}
}
Echo" | ";Echo"
";
Echo "";
Echo "[restricted]";
Echo "";
// Echo" | ";