usebook-checkins Mailing List for UseBook
Status: Inactive
Brought to you by:
pc_freak
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
(10) |
Jul
(12) |
Aug
(10) |
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: Vandamme S. <kid...@us...> - 2005-08-25 21:30:30
|
Update of /cvsroot/usebook/UseBook/templates/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13062/templates/default Modified Files: global.tpl.php posts.tpl.php Log Message: Preparing 0.3.5 release Index: global.tpl.php =================================================================== RCS file: /cvsroot/usebook/UseBook/templates/default/global.tpl.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** global.tpl.php 28 Jul 2005 10:19:41 -0000 1.6 --- global.tpl.php 25 Aug 2005 21:30:22 -0000 1.7 *************** *** 615,618 **** --- 615,619 ---- $templates['normal_footer'] = ' <p id="linkbar"> + {admin} <a href="{url_admin}">{l_Admin}</a> · <a href="{url_stats}">{l_Stats}</a> </p> Index: posts.tpl.php =================================================================== RCS file: /cvsroot/usebook/UseBook/templates/default/posts.tpl.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** posts.tpl.php 21 Aug 2005 11:15:52 -0000 1.7 --- posts.tpl.php 25 Aug 2005 21:30:22 -0000 1.8 *************** *** 91,101 **** <table class="maintable"> <tr> ! <th colspan="2">{l_PostNew}</th> </tr> <tr> <td class="fieldtitle">{l_Name}</td> <td>{name}</td> - </tr> - <tr> <td class="fieldtitle">{l_Email}</td> <td>{mail}</td> --- 91,99 ---- <table class="maintable"> <tr> ! <th colspan="4">{l_PostNew}</th> </tr> <tr> <td class="fieldtitle">{l_Name}</td> <td>{name}</td> <td class="fieldtitle">{l_Email}</td> <td>{mail}</td> *************** *** 103,114 **** <tr> <td class="fieldtitle">{l_Message}</td> ! <td>{message}</td> </tr> <tr> <td class="fieldtitle">{l_Website}</td> ! <td>{website}</td> ! </tr> <tr> ! <td colspan=2 class="formcontrols"><input type="submit" name="Submit" value="{l_Send}"> <input type="reset" value="{l_Reset}" /></td> </tr> </table> --- 101,111 ---- <tr> <td class="fieldtitle">{l_Message}</td> ! <td colspan="3">{message}</td> </tr> <tr> <td class="fieldtitle">{l_Website}</td> ! <td colspan="3">{website}</td> <tr> ! <td colspan=4 class="formcontrols"><input type="submit" name="Submit" value="{l_Send}"> <input type="reset" value="{l_Reset}" /></td> </tr> </table> |
From: Vandamme S. <kid...@us...> - 2005-08-25 21:30:10
|
Update of /cvsroot/usebook/UseBook/sources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12874/sources Modified Files: core.php page_foot.php Log Message: Preparing 0.3.5 release Index: core.php =================================================================== RCS file: /cvsroot/usebook/UseBook/sources/core.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** core.php 21 Aug 2005 11:15:07 -0000 1.6 --- core.php 25 Aug 2005 21:29:58 -0000 1.7 *************** *** 67,71 **** define('TABLE_PREFIX', $database['prefix']); define('COOKIE_PREFIX', $config['cookie_prefix']); ! define('USEBOOK_VERSION', '0.4-CVS'); define('USER_PREG', '#^[A-Za-z0-9_\-]+$#'); define('EMAIL_PREG', '#^[a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+$#'); --- 67,71 ---- define('TABLE_PREFIX', $database['prefix']); define('COOKIE_PREFIX', $config['cookie_prefix']); ! define('USEBOOK_VERSION', '0.3.5'); define('USER_PREG', '#^[A-Za-z0-9_\-]+$#'); define('EMAIL_PREG', '#^[a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+$#'); Index: page_foot.php =================================================================== RCS file: /cvsroot/usebook/UseBook/sources/page_foot.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** page_foot.php 28 Jul 2005 10:16:19 -0000 1.4 --- page_foot.php 25 Aug 2005 21:29:58 -0000 1.5 *************** *** 34,37 **** --- 34,38 ---- // $template->parse('normal_footer', 'global', array( + 'admin' => ( $admin->login == true ) ? $lang['Admin']:'', 'url_admin' => $functions->make_url(ROOT_PATH.'admin/admin.php'), 'url_stats' => $functions->make_url(ROOT_PATH.'stats.php') |
From: Vandamme S. <kid...@us...> - 2005-08-25 21:29:31
|
Update of /cvsroot/usebook/UseBook/languages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12720/languages Modified Files: lang_English.php lang_Nederlands.php Log Message: Preparing 0.3.5 release Index: lang_Nederlands.php =================================================================== RCS file: /cvsroot/usebook/UseBook/languages/lang_Nederlands.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** lang_Nederlands.php 28 Jul 2005 10:19:13 -0000 1.4 --- lang_Nederlands.php 25 Aug 2005 21:29:23 -0000 1.5 *************** *** 70,72 **** --- 70,80 ---- $lang['Stats'] = 'Statistieken'; $lang['NotFinished'] = 'Deze pagina is nog niet beschikbaar.'; + $lang['Username'] = 'Gebruikersnaam'; + $lang['Password'] = 'Wachtwoord'; + $lang['LoginTrue'] = 'U bent succesvol ingelogd.'; + $lang['LoginFalse'] = 'Uw wachtwoord en/of gebruikersnaam waren incorrect!'; + $lang['AllreadyLoged'] = 'Uw bent al ingelogd als admin.'; + $lang['Quote'] = 'Quote'; + $lang['Wrote'] = '%s schreef'; + $lang['PrivateMessage'] = 'Prive bericht'; ?> Index: lang_English.php =================================================================== RCS file: /cvsroot/usebook/UseBook/languages/lang_English.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** lang_English.php 21 Aug 2005 11:14:19 -0000 1.6 --- lang_English.php 25 Aug 2005 21:29:23 -0000 1.7 *************** *** 76,79 **** $lang['AllreadyLoged'] = 'You are allready loged in as an admin.'; $lang['Quote'] = 'Quote'; ! $lang['Wrote'] = 'Wrote'; ?> --- 76,80 ---- $lang['AllreadyLoged'] = 'You are allready loged in as an admin.'; $lang['Quote'] = 'Quote'; ! $lang['Wrote'] = '%s wrote'; ! $lang['PrivateMessage'] = 'Private message'; ?> |
From: Vandamme S. <kid...@us...> - 2005-08-25 21:27:38
|
Update of /cvsroot/usebook/UseBook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12038 Modified Files: changelog.txt config.php index.php Log Message: Preparing 0.3.5 release Index: config.php =================================================================== RCS file: /cvsroot/usebook/UseBook/config.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** config.php 21 Aug 2005 11:13:21 -0000 1.8 --- config.php 25 Aug 2005 21:27:29 -0000 1.9 *************** *** 43,46 **** --- 43,47 ---- // Admin // + // Does not work (yet) $config['admin'] = array ( 'admin' => '098f6bcd4621d373cade4e832627b4f6' Index: changelog.txt =================================================================== RCS file: /cvsroot/usebook/UseBook/changelog.txt,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** changelog.txt 21 Aug 2005 11:13:21 -0000 1.8 --- changelog.txt 25 Aug 2005 21:27:29 -0000 1.9 *************** *** 1,5 **** $Header$ ! UseBook 0.4 Changelog ------------------------------ - Added quote --- 1,5 ---- $Header$ ! UseBook 0.3.5 Changelog ------------------------------ - Added quote Index: index.php =================================================================== RCS file: /cvsroot/usebook/UseBook/index.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** index.php 21 Aug 2005 11:13:21 -0000 1.8 --- index.php 25 Aug 2005 21:27:29 -0000 1.9 *************** *** 61,65 **** $order = ( $functions->get_config('post_order') == 1 ) ? 'DESC': 'ASC'; ! $data = $db->query('SELECT * FROM '.TABLE_PREFIX.'posts ORDER BY id '.$order.' LIMIT '.$functions->get_config('posts_page')*$page.', '.$functions->get_config('posts_page')); if ( $db->num_rows($data) == 0 ) --- 61,68 ---- $order = ( $functions->get_config('post_order') == 1 ) ? 'DESC': 'ASC'; ! /*USEBOOK0.4-$private = ( $admin->login == true ) ? '':'WHERE private = 0';*/ ! $private = ''; ! ! $data = $db->query('SELECT * FROM '.TABLE_PREFIX.'posts '.$private.' ORDER BY id '.$order.' LIMIT '.$functions->get_config('posts_page')*$page.', '.$functions->get_config('posts_page')); if ( $db->num_rows($data) == 0 ) *************** *** 81,85 **** 'color' => $post_color, 'id' => ( $admin->login ) ? '<a href="'.$functions->make_url('stats.php', array('id' => $posts['id'])).'">'.$posts['id'].'</a>' : '#'.$posts['id'], ! 'name' => $posts['name'], 'mail' => ( !empty($posts['mail']) ) ? $lang['Email'].': '.$functions->show_email($posts['mail']) : '', 'site' => ( !empty($posts['site']) ) ? $lang['Website'].': <a href="'.$posts['site'].'" target="_BLANK">'.$posts['site'].'</a>' : '', --- 84,88 ---- 'color' => $post_color, 'id' => ( $admin->login ) ? '<a href="'.$functions->make_url('stats.php', array('id' => $posts['id'])).'">'.$posts['id'].'</a>' : '#'.$posts['id'], ! 'name' => ( $posts['admin'] == 1) ? '<u>'.$posts['name'].'</u>': $posts['name'], 'mail' => ( !empty($posts['mail']) ) ? $lang['Email'].': '.$functions->show_email($posts['mail']) : '', 'site' => ( !empty($posts['site']) ) ? $lang['Website'].': <a href="'.$posts['site'].'" target="_BLANK">'.$posts['site'].'</a>' : '', *************** *** 115,118 **** --- 118,122 ---- 'message' => '<textarea rows="10" cols="60" name="post_message">'.$message.'</textarea>', 'website' => '<input type="text" name="post_website" size="25" maxlength="255" value="'.$website.'"/>', + /*USEBOOK0.4-'private' => '<input type="checkbox" name="private" id="private" value="1" />',*/ 'form_start' => '<form method="POST" action="'.$functions->make_url('index.php').'">', 'form_end' => '</form>' |
From: Vandamme S. <kid...@us...> - 2005-08-21 11:16:56
|
Update of /cvsroot/usebook/UseBook/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5984/admin Modified Files: admin.php Log Message: A bit of everything. Index: admin.php =================================================================== RCS file: /cvsroot/usebook/UseBook/admin/admin.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin.php 28 Jul 2005 10:20:04 -0000 1.2 --- admin.php 21 Aug 2005 11:16:48 -0000 1.3 *************** *** 1,4 **** <?php - /* Copyright (C) 2005 UseBook Team --- 1,3 ---- *************** *** 38,44 **** // ! // Admin // ! $template->parse('msgbox', 'global', array('box_title' => $lang['Error'], 'content' => $lang['NotFinished']) ); // --- 37,61 ---- // ! // Login // ! if( !empty($_POST['username']) && !empty($_POST['password']) ) { ! if ( $admin->login($_POST['username'],md5($_POST['password'])) ) ! $template->parse('msgbox', 'global', array('box_title' => $lang['Admin'], 'content' => $lang['LoginTrue']) ); ! else ! $template->parse('msgbox', 'global', array('box_title' => $lang['Admin'], 'content' => $lang['LoginFalse']) ); ! } ! else { ! // ! // Admin ! // ! if ( !$admin->login ) { ! $template->parse('admin_login', 'admin', array( ! 'location' => 'admin.php', ! 'username' => '<input type="text" name="username" size="25" maxlength="255" value=""/>', ! 'password' => '<input type="password" name="password" size="25" maxlength="255" value=""/>' ! ) ); ! } else ! $template->parse('msgbox', 'global', array('box_title' => $lang['Admin'], 'content' => $lang['AllreadyLoged']) ); ! } // |
From: Vandamme S. <kid...@us...> - 2005-08-21 11:16:03
|
Update of /cvsroot/usebook/UseBook/templates/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5613/templates/default Modified Files: posts.tpl.php Log Message: A bit of everything. Index: posts.tpl.php =================================================================== RCS file: /cvsroot/usebook/UseBook/templates/default/posts.tpl.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** posts.tpl.php 7 Jul 2005 16:40:07 -0000 1.6 --- posts.tpl.php 21 Aug 2005 11:15:52 -0000 1.7 *************** *** 58,61 **** --- 58,62 ---- </td> <td class="postinfo"> + <div class="postlinks">{post_links}</div> <div class="postdate">{id} {date}</div> </td> |
From: Vandamme S. <kid...@us...> - 2005-08-21 11:15:18
|
Update of /cvsroot/usebook/UseBook/sources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5481/sources Modified Files: admin.php core.php functions.php Log Message: A bit of everything. Index: functions.php =================================================================== RCS file: /cvsroot/usebook/UseBook/sources/functions.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** functions.php 28 Jul 2005 10:16:19 -0000 1.5 --- functions.php 21 Aug 2005 11:15:07 -0000 1.6 *************** *** 42,45 **** --- 42,73 ---- } + // + // Add slashes to and trim variables + // + function slash_trim_global($global) { + + if ( is_array($global) ) { + + foreach ( $global as $key => $val ) { + + if ( is_array($val) ) { + + $global[$key] = slash_trim_global($val); + + } else { + + if ( !get_magic_quotes_gpc() ) + $val = addslashes($val); + $global[$key] = trim($val); + + } + + } + + } + + return $global; + + } class functions { *************** *** 202,214 **** function markup($string, $bbcode=true, $smilies=true, $html=false) { ! global $template, $lang; if ( !$html ) ! $string = htmlspecialchars($string); if ( $smilies ) { ! foreach ( $template->get_config('smilies') as $key => $val ) ! $string = str_replace($key, '<img src="templates/'.$this->get_config('template').'/smilies/'.$val.'" alt="'.$key.'" />', $string); } --- 230,249 ---- function markup($string, $bbcode=true, $smilies=true, $html=false) { ! global $db, $template, $lang; ! ! $string = preg_replace('#(script|about|applet|activex|chrome):#is', '\\1:', $string); ! ! // ! // Needed by some BBCode regexps and smilies ! // ! $string = ' '.$string.' '; if ( !$html ) ! $string = unhtml($string); if ( $smilies ) { ! foreach ( $template->get_config('smilies') as $pattern => $img ) ! $string = preg_replace('#([\s\]\[])'.preg_quote(unhtml($pattern), '#').'([\s\]\[])#', '\\1<img src="templates/'.$this->get_config('template').'/smilies/'.$img.'" alt="'.unhtml($pattern).'" />\\2', $string); } *************** *** 273,277 **** foreach ( $matches[1] as $oldpart ) { ! $newpart = preg_replace(array('#\[#', '#\]#'), array('[', ']'), $oldpart); $string = str_replace($oldpart, $newpart, $string); --- 308,312 ---- foreach ( $matches[1] as $oldpart ) { ! $newpart = preg_replace(array('#\[#', '#\]#', "#\n#", "#\r#"), array('[', ']', '<br />', ''), $oldpart); $string = str_replace($oldpart, $newpart, $string); *************** *** 282,291 **** // ! // Needed by some BBCode regexps // ! $string = ' '.$string.' '; // ! // All kinds of regexps // $regexps = array( --- 317,333 ---- // ! // Parse URL's and e-mail addresses // ! $ignore_chars = "^a-z0-9"; # warning, rawly included in regex! ! $string = preg_replace(array( ! "#([\s][".$ignore_chars."]*?)([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)([".$ignore_chars."]*?[\s])#is", ! "#([\s][".$ignore_chars."]*?)([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)([".$ignore_chars."]*?[\s])#is" ! ), array( ! '\\1<a href="\\2"'.$target_blank.$rel_nofollow.'>\\2</a>\\3', ! '\\1<a href="mailto:\\2">\\2</a>\\4' ! ), $string); // ! // All kinds of BBCode regexps // $regexps = array( *************** *** 295,317 **** "#\[i\](.*?)\[/i\]#is" => '<em>\\1</em>', // [u]text[/u] ! "#\[u\](.*?)\[/u\]#is" => '<em class="underline">\\1</em>', // [img]image[/img] ! "#\[img\]([\w]+?://[^ \"\n\r\t<]*?)\.(gif|png|jpe?g)\[/img\]#is" => '<img src="\\1.\\2" alt="'.$lang['UserPostedImage'].'" />', // [url]http://www.usebb.net[/url] ! "#\[url\]([\w]+?://[^ \"\n\r\t<]*?)\[/url\]#is" => '<a href="\\1"'.$target_blank.$rel_nofollow.'>\\1</a>', // [url=http://www.usebb.net]UseBB[/url] ! "#\[url=([\w]+?://[^ \"\n\r\t<]*?)\](.*?)\[/url\]#is" => '<a href="\\1"'.$target_blank.$rel_nofollow.'>\\2</a>', ! // http://www.usebb.net ! "#([\s\]\[])([\w]+?://[^ \"\n\r\t<]*?)([\s\]\[])#is" => '\\1<a href="\\2"'.$target_blank.$rel_nofollow.'>\\2</a>\\3', // [mailto]som...@no...[/mailto] "#\[mailto\]([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/mailto\]#is" => '<a href="mailto:\\1">\\1</a>', // [mailto=som...@no...]mail me[/mailto] "#\[mailto=([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\](.*?)\[/mailto\]#is" => '<a href="mailto:\\1">\\3</a>', - // som...@no... - "#([\s\]\[])([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)([\s\]\[])#is" => '\\1<a href="mailto:\\2">\\2</a>\\4', // [color=red]text[/color] ! "#\[color=(.*?)\](.*?)\[/color\]#is" => '<span style="color:\\1">\\2</span>', // [size=14]text[/size] ! "#\[size=(.*?)\](.*?)\[/size\]#is" => '<span style="font-size:\\1pt">\\2</span>', // [google=keyword]text[/google] "#\[google=(.*?)\](.*?)\[/google\]#is" => '<a href="http://www.google.com/search?q=\\1"'.$target_blank.$rel_nofollow.'>\\2</a>', --- 337,359 ---- "#\[i\](.*?)\[/i\]#is" => '<em>\\1</em>', // [u]text[/u] ! "#\[u\](.*?)\[/u\]#is" => '<u>\\1</u>', ! // [s]text[/s] ! "#\[s\](.*?)\[/s\]#is" => '<del>\\1</del>', // [img]image[/img] ! "#\[img\]([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\.(gif|png|jpe?g)\[/img\]#is" => '<img src="\\1.\\2" alt="'.$lang['UserPostedImage'].'" />', // [url]http://www.usebb.net[/url] ! "#\[url\]([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\[/url\]#is" => '<a href="\\1"'.$target_blank.$rel_nofollow.'>\\1</a>', // [url=http://www.usebb.net]UseBB[/url] ! "#\[url=([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\](.*?)\[/url\]#is" => '<a href="\\1"'.$target_blank.$rel_nofollow.'>\\2</a>', // [mailto]som...@no...[/mailto] "#\[mailto\]([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/mailto\]#is" => '<a href="mailto:\\1">\\1</a>', // [mailto=som...@no...]mail me[/mailto] "#\[mailto=([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\](.*?)\[/mailto\]#is" => '<a href="mailto:\\1">\\3</a>', // [color=red]text[/color] ! "#\[color=([\#a-z0-9]+)\](.*?)\[/color\]#is" => '<span style="color:\\1">\\2</span>', ! // [size=999]too big text[/size] ! "#\[size=([0-9]{3,})\](.*?)\[/size\]#is" => '\\2', // [size=14]text[/size] ! "#\[size=([0-9]*?)\](.*?)\[/size\]#is" => '<span style="font-size:\\1pt">\\2</span>', // [google=keyword]text[/google] "#\[google=(.*?)\](.*?)\[/google\]#is" => '<a href="http://www.google.com/search?q=\\1"'.$target_blank.$rel_nofollow.'>\\2</a>', *************** *** 332,347 **** $string = preg_replace("#\[quote=(.*?)\](.*?)\[/quote\]#is", sprintf($template->get_config('quote_format'), sprintf($lang['Wrote'], '\\1'), '\\2'), $string); - $string = trim($string); - } if ( !$html ) { ! $string = str_replace("\n", "<br />", $string); $string = str_replace("\r", "", $string); } ! return $string; } --- 374,387 ---- $string = preg_replace("#\[quote=(.*?)\](.*?)\[/quote\]#is", sprintf($template->get_config('quote_format'), sprintf($lang['Wrote'], '\\1'), '\\2'), $string); } if ( !$html ) { ! $string = str_replace("\n", "<br />\n", $string); $string = str_replace("\r", "", $string); } ! return trim($string); } Index: admin.php =================================================================== RCS file: /cvsroot/usebook/UseBook/sources/admin.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** admin.php 18 Jun 2005 12:29:20 -0000 1.4 --- admin.php 21 Aug 2005 11:15:06 -0000 1.5 *************** *** 108,114 **** // Login // ! function login($username, $password, $db=false) { ! ! global $db; if ( !empty($this->admins[$username]) && $this->admins[$username] == $password ) { --- 108,112 ---- // Login // ! function login($username, $password) { if ( !empty($this->admins[$username]) && $this->admins[$username] == $password ) { Index: core.php =================================================================== RCS file: /cvsroot/usebook/UseBook/sources/core.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** core.php 28 Jul 2005 10:16:19 -0000 1.5 --- core.php 21 Aug 2005 11:15:07 -0000 1.6 *************** *** 67,75 **** define('TABLE_PREFIX', $database['prefix']); define('COOKIE_PREFIX', $config['cookie_prefix']); ! define('USEBOOK_VERSION', '0.3-CVS'); define('USER_PREG', '#^[A-Za-z0-9_\-]+$#'); define('EMAIL_PREG', '#^[a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+$#'); define('WEB_PREG', '#^[\w]+?://[^ \"\n\r\t<]*?$#i'); define('IMG_PREG', '#^[\w]+?://[^ \"\n\r\t<]*?\.(gif|png|jpe?g)$#i'); // --- 67,83 ---- define('TABLE_PREFIX', $database['prefix']); define('COOKIE_PREFIX', $config['cookie_prefix']); ! define('USEBOOK_VERSION', '0.4-CVS'); define('USER_PREG', '#^[A-Za-z0-9_\-]+$#'); define('EMAIL_PREG', '#^[a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+$#'); define('WEB_PREG', '#^[\w]+?://[^ \"\n\r\t<]*?$#i'); define('IMG_PREG', '#^[\w]+?://[^ \"\n\r\t<]*?\.(gif|png|jpe?g)$#i'); + + // + // Add slashes and trim get, post and cookie variables + // + $_GET = slash_trim_global($_GET); + $_POST = slash_trim_global($_POST); + $_COOKIE = slash_trim_global($_COOKIE); + $_REQUEST = slash_trim_global($_REQUEST); // |
From: Vandamme S. <kid...@us...> - 2005-08-21 11:14:27
|
Update of /cvsroot/usebook/UseBook/languages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5351/languages Modified Files: lang_English.php Log Message: A bit of everything. Index: lang_English.php =================================================================== RCS file: /cvsroot/usebook/UseBook/languages/lang_English.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** lang_English.php 28 Jul 2005 10:19:13 -0000 1.5 --- lang_English.php 21 Aug 2005 11:14:19 -0000 1.6 *************** *** 70,72 **** --- 70,79 ---- $lang['Stats'] = 'Stats'; $lang['NotFinished'] = 'This page is not yet available.'; + $lang['Username'] = 'Username'; + $lang['Password'] = 'Password'; + $lang['LoginTrue'] = 'You have been succesfully loged in.'; + $lang['LoginFalse'] = 'Your password and/or username was incorrect!'; + $lang['AllreadyLoged'] = 'You are allready loged in as an admin.'; + $lang['Quote'] = 'Quote'; + $lang['Wrote'] = 'Wrote'; ?> |
From: Vandamme S. <kid...@us...> - 2005-08-21 11:13:30
|
Update of /cvsroot/usebook/UseBook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5205 Modified Files: .htaccess changelog.txt config.php index.php Log Message: A bit of everything. Index: .htaccess =================================================================== RCS file: /cvsroot/usebook/UseBook/.htaccess,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .htaccess 28 Jul 2005 10:18:02 -0000 1.1 --- .htaccess 21 Aug 2005 11:13:21 -0000 1.2 *************** *** 5,8 **** --- 5,9 ---- RewriteEngine on RewriteRule ^index\.html$ index.php + RewriteRule ^index-quote-([0-9]+)\.html$ index.php?action=quote&id=$1 RewriteRule ^index-([0-9]+)\.html$ index.php?page=$1 RewriteRule ^admin/admin\.html$ admin/admin.php Index: changelog.txt =================================================================== RCS file: /cvsroot/usebook/UseBook/changelog.txt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** changelog.txt 2 Aug 2005 12:58:45 -0000 1.7 --- changelog.txt 21 Aug 2005 11:13:21 -0000 1.8 *************** *** 1,4 **** --- 1,13 ---- $Header$ + UseBook 0.4 Changelog + ------------------------------ + - Added quote + - Fixed admin login + - Fixed cookies not being send + - Updated bbcode parsing + - Some small adjustments and bugfixes + + UseBook 0.3 Changelog ------------------------------ Index: config.php =================================================================== RCS file: /cvsroot/usebook/UseBook/config.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** config.php 28 Jul 2005 10:16:50 -0000 1.7 --- config.php 21 Aug 2005 11:13:21 -0000 1.8 *************** *** 44,48 **** // $config['admin'] = array ( ! 'admin' => '81dc9bdb52d04dc20036dbd8313ed055' ); --- 44,48 ---- // $config['admin'] = array ( ! 'admin' => '098f6bcd4621d373cade4e832627b4f6' ); *************** *** 66,69 **** --- 66,70 ---- $config['antispam'] = 900; $config['post_order'] = 1; + $config['post_quote'] = 1; // *************** *** 89,93 **** $config['login_lifetime'] = 3600; $config['cookie_prefix'] = 'UseBook_'; ! $config['cookie_domain'] = ''; $config['cookie_path'] = ''; $config['cookie_secure'] = 0; --- 90,94 ---- $config['login_lifetime'] = 3600; $config['cookie_prefix'] = 'UseBook_'; ! $config['cookie_domain'] = 'localhost'; $config['cookie_path'] = ''; $config['cookie_secure'] = 0; Index: index.php =================================================================== RCS file: /cvsroot/usebook/UseBook/index.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** index.php 28 Jul 2005 10:16:50 -0000 1.7 --- index.php 21 Aug 2005 11:13:21 -0000 1.8 *************** *** 67,88 **** else { $template->parse('post_start','posts',array('pages' => $pages)); ! ! ## Values ! $post_color = 2; ! while ( $posts = $db->fetch_result($data) ) { ! $template->parse('post', 'posts', array ( ! 'color' => $post_color, ! 'id' => ( $admin->login ) ? '<a href="'.$functions->make_url('stats.php', array('id' => $posts['id'])).'">'.$posts['id'].'</a>' : '#'.$posts['id'], ! 'name' => $posts['name'], ! 'mail' => ( !empty($posts['mail']) ) ? $lang['Email'].': '.$functions->show_email($posts['mail']) : '', ! 'site' => ( !empty($posts['site']) ) ? $lang['Website'].': <a href="'.$posts['site'].'" target="_BLANK">'.$posts['site'].'</a>' : '', ! 'date' => $functions->make_date($posts['date']), ! 'post' => $functions->markup($posts['post'])) ); ! $post_color = ( $post_color == 2 ) ? 1 : 2; ! } ! $template->parse('post_stop','posts'); } /* --- 67,97 ---- else { $template->parse('post_start','posts',array('pages' => $pages)); ! ! ## Color ! $post_color = 2; ! while ( $posts = $db->fetch_result($data) ) { ! ! ## Post Links ! $postlinks = ""; ! if ( $functions->get_config('post_quote') ) ! $postlinks .= '<a href="'.$functions->make_url('index.php', array('action' => 'quote', 'id' => $posts['id'])).'">'.$lang['Quote'].'</a>'; ! ! $template->parse('post', 'posts', array ( ! 'color' => $post_color, ! 'id' => ( $admin->login ) ? '<a href="'.$functions->make_url('stats.php', array('id' => $posts['id'])).'">'.$posts['id'].'</a>' : '#'.$posts['id'], ! 'name' => $posts['name'], ! 'mail' => ( !empty($posts['mail']) ) ? $lang['Email'].': '.$functions->show_email($posts['mail']) : '', ! 'site' => ( !empty($posts['site']) ) ? $lang['Website'].': <a href="'.$posts['site'].'" target="_BLANK">'.$posts['site'].'</a>' : '', ! 'date' => $functions->make_date($posts['date']), ! 'post' => $functions->markup($posts['post']), ! 'post_links' => $postlinks )); ! $post_color = ( $post_color == 2 ) ? 1 : 2; ! ! } + $template->parse('post_stop','posts'); + } /* *************** *** 93,97 **** $name = (!empty($admin->username)) ? $admin->username: ((!empty($_POST['post_name'])) ? $_POST['post_name']:''); $mail = (!empty($admin->email)) ? $admin->email: ((!empty($_POST['post_mail'])) ? $_POST['post_mail']:''); ! $message = (!empty($_POST['post_message'])) ? $_POST['post_message']:''; $website = (!empty($admin->website)) ? $admin->website: ((!empty($_POST['post_website'])) ? $_POST['post_website']:''); --- 102,111 ---- $name = (!empty($admin->username)) ? $admin->username: ((!empty($_POST['post_name'])) ? $_POST['post_name']:''); $mail = (!empty($admin->email)) ? $admin->email: ((!empty($_POST['post_mail'])) ? $_POST['post_mail']:''); ! if ( !empty($_GET['action']) && $_GET['action'] == 'quote' && is_numeric($_GET['id'])) { ! $data = $db->query('SELECT name, post FROM '.TABLE_PREFIX.'posts WHERE id='.$_GET['id']); ! $data = $db->fetch_result($data); ! $message = '[quote='.$data['name'].']'.$data['post'].'[/quote]'; ! } else ! $message = (!empty($_POST['post_message'])) ? $_POST['post_message']:''; $website = (!empty($admin->website)) ? $admin->website: ((!empty($_POST['post_website'])) ? $_POST['post_website']:''); |
From: Vandamme S. <kid...@us...> - 2005-08-02 12:58:54
|
Update of /cvsroot/usebook/UseBook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24548 Modified Files: changelog.txt Log Message: UseBook 0.3 RC Index: changelog.txt =================================================================== RCS file: /cvsroot/usebook/UseBook/changelog.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** changelog.txt 7 Jul 2005 16:38:09 -0000 1.6 --- changelog.txt 2 Aug 2005 12:58:45 -0000 1.7 *************** *** 10,14 **** - Fixed posts id bug - Added friendly url's ! - Some small adjustments UseBook 0.2 Changelog --- 10,14 ---- - Fixed posts id bug - Added friendly url's ! - Some small adjustments and bugfixes UseBook 0.2 Changelog |
From: Vandamme S. <kid...@us...> - 2005-07-28 10:20:15
|
Update of /cvsroot/usebook/UseBook/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13920/admin Modified Files: admin.php Log Message: UseBook 0.3 RC Index: admin.php =================================================================== RCS file: /cvsroot/usebook/UseBook/admin/admin.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** admin.php 7 Jul 2005 16:39:03 -0000 1.1 --- admin.php 28 Jul 2005 10:20:04 -0000 1.2 *************** *** 25,51 **** define('INCLUDED', true); ! define('ROOT_PATH', './'); // // Load engine // ! require('sources/core.php'); // // Page head // ! require('sources/page_head.php'); // // Admin // ! $template->parse('admin_login', 'admin', array( ! ! ); // // Page bottom // ! require('sources/page_foot.php'); ?> --- 25,49 ---- define('INCLUDED', true); ! define('ROOT_PATH', '../'); // // Load engine // ! require(ROOT_PATH.'sources/core.php'); // // Page head // ! require(ROOT_PATH.'sources/page_head.php'); // // Admin // ! $template->parse('msgbox', 'global', array('box_title' => $lang['Error'], 'content' => $lang['NotFinished']) ); // // Page bottom // ! require(ROOT_PATH.'sources/page_foot.php'); ?> |
From: Vandamme S. <kid...@us...> - 2005-07-28 10:19:53
|
Update of /cvsroot/usebook/UseBook/templates/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13845/templates/default Modified Files: global.tpl.php Log Message: UseBook 0.3 RC Index: global.tpl.php =================================================================== RCS file: /cvsroot/usebook/UseBook/templates/default/global.tpl.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** global.tpl.php 7 Jul 2005 16:40:07 -0000 1.5 --- global.tpl.php 28 Jul 2005 10:19:41 -0000 1.6 *************** *** 39,42 **** --- 39,43 ---- // $templates['config'] = array( + 'content_type' => 'html', 'item_delimiter' => '·', 'forumlist_topic_rtrim_completion' => '...', *************** *** 197,200 **** --- 198,204 ---- border-bottom: 2px solid #EBD6AD; } + h1#boardname a { + text-decoration: none; + } h2#boarddescr { text-align: right; *************** *** 605,610 **** <div id="shadow-left"> <div id="shadow-right"> ! <p id="logo"><a href="index.php"><img src="http://www.usebb.net/community/templates/default/gfx/usebb.png" alt="UseBB" title="Home" /></a></p> ! <h1 id="boardname"><span id="line">{gb_name}</span></h1> <h2 id="boarddescr">{gb_descr}</h2> '; --- 609,613 ---- <div id="shadow-left"> <div id="shadow-right"> ! <h1 id="boardname"><a href="{gb_url}"><span id="line">{gb_name}</span></a></h1> <h2 id="boarddescr">{gb_descr}</h2> '; |
From: Vandamme S. <kid...@us...> - 2005-07-28 10:19:34
|
Update of /cvsroot/usebook/UseBook/languages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13788/languages Modified Files: lang_English.php lang_Nederlands.php Log Message: UseBook 0.3 RC Index: lang_Nederlands.php =================================================================== RCS file: /cvsroot/usebook/UseBook/languages/lang_Nederlands.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** lang_Nederlands.php 3 Jun 2005 15:31:25 -0000 1.3 --- lang_Nederlands.php 28 Jul 2005 10:19:13 -0000 1.4 *************** *** 39,45 **** // Uncomment and change when necessary for translations // ! #$lang['character_encoding'] = 'iso-8859-1'; $lang['language_code'] = 'nl'; ! #$lang['text_direction'] = 'ltr'; $lang['DebugMode'] = 'Debug modus'; --- 39,45 ---- // Uncomment and change when necessary for translations // ! $lang['character_encoding'] = 'iso-8859-1'; $lang['language_code'] = 'nl'; ! $lang['text_direction'] = 'ltr'; $lang['DebugMode'] = 'Debug modus'; *************** *** 65,67 **** --- 65,72 ---- $lang['PostedTitle'] = 'Bericht geplaatst!'; $lang['Return'] = 'Terug'; + $lang['Antispam'] = 'Anti spam'; + $lang['AllreadyPosted'] = 'U hebt al in dit gastenboek gepost.'; + $lang['Admin'] = 'Admin'; + $lang['Stats'] = 'Statistieken'; + $lang['NotFinished'] = 'Deze pagina is nog niet beschikbaar.'; ?> Index: lang_English.php =================================================================== RCS file: /cvsroot/usebook/UseBook/languages/lang_English.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** lang_English.php 18 Jun 2005 12:29:00 -0000 1.4 --- lang_English.php 28 Jul 2005 10:19:13 -0000 1.5 *************** *** 39,45 **** // Uncomment and change when necessary for translations // ! #$lang['character_encoding'] = 'iso-8859-1'; ! #$lang['language_code'] = 'en'; ! #$lang['text_direction'] = 'ltr'; $lang['DebugMode'] = 'Debug mode'; --- 39,45 ---- // Uncomment and change when necessary for translations // ! $lang['character_encoding'] = 'iso-8859-1'; ! $lang['language_code'] = 'en'; ! $lang['text_direction'] = 'ltr'; $lang['DebugMode'] = 'Debug mode'; *************** *** 67,69 **** --- 67,72 ---- $lang['Antispam'] = 'Anti spam'; $lang['AllreadyPosted'] = 'You have allready posted in this questbook.'; + $lang['Admin'] = 'Admin'; + $lang['Stats'] = 'Stats'; + $lang['NotFinished'] = 'This page is not yet available.'; ?> |
From: Vandamme S. <kid...@us...> - 2005-07-28 10:18:13
|
Update of /cvsroot/usebook/UseBook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13508 Added Files: .htaccess stats.php Log Message: UseBook 0.3 RC --- NEW FILE: .htaccess --- Options -Indexes DirectoryIndex index.php <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^index\.html$ index.php RewriteRule ^index-([0-9]+)\.html$ index.php?page=$1 RewriteRule ^admin/admin\.html$ admin/admin.php RewriteRule ^stats\.html$ stats.php </IfModule> --- NEW FILE: stats.php --- <?php /* Copyright (C) 2005 UseBook Team http://usebook.sourceforge.net $Header: /cvsroot/usebook/UseBook/stats.php,v 1.1 2005/07/28 10:18:02 kidkiller Exp $ This file is part of UseBook. UseBook is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. UseBook is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with UseBook; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ define('INCLUDED', true); define('ROOT_PATH', './'); // // Load engine // require(ROOT_PATH.'sources/core.php'); // // Page head // require(ROOT_PATH.'sources/page_head.php'); // // Admin // $template->parse('msgbox', 'global', array('box_title' => $lang['Error'], 'content' => $lang['NotFinished']) ); // // Page bottom // require(ROOT_PATH.'sources/page_foot.php'); ?> |
From: Vandamme S. <kid...@us...> - 2005-07-28 10:17:00
|
Update of /cvsroot/usebook/UseBook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13233 Modified Files: config.php index.php post.php Log Message: UseBook 0.3 RC Index: config.php =================================================================== RCS file: /cvsroot/usebook/UseBook/config.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** config.php 7 Jul 2005 16:38:09 -0000 1.6 --- config.php 28 Jul 2005 10:16:50 -0000 1.7 *************** *** 54,60 **** $config['gb_descr'] = 'The usable guestbook.'; $config['closed'] = 0; ! $config['closed_title']= 'Closed *****!'; ! $config['closed_msg'] = 'Work Work Work'; ! $config['posts_page'] = 5; $config['date_format'] = 'D M d, Y g:i a'; $config['timezone'] = 0; --- 54,60 ---- $config['gb_descr'] = 'The usable guestbook.'; $config['closed'] = 0; ! $config['closed_title']= 'Closed for repairs!'; ! $config['closed_msg'] = 'Closed'; ! $config['posts_page'] = 100; $config['date_format'] = 'D M d, Y g:i a'; $config['timezone'] = 0; *************** *** 76,83 **** // $config['output_compression'] = 0; ! $config['target_blank'] = 0; $config['rel_nofollow'] = 0; $config['auto_free_sql_results'] = 1; ! $config['friendly_urls'] = 0; // --- 76,85 ---- // $config['output_compression'] = 0; ! $config['target_blank'] = 1; $config['rel_nofollow'] = 0; $config['auto_free_sql_results'] = 1; ! $config['friendly_urls'] = 1; ! $config['hide_undefined_template_setting_warnings'] = 0; ! $config['hide_undefined_template_warnings'] = 0; // Index: post.php =================================================================== RCS file: /cvsroot/usebook/UseBook/post.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** post.php 18 Jun 2005 12:28:38 -0000 1.1 --- post.php 28 Jul 2005 10:16:50 -0000 1.2 *************** *** 34,38 **** // ! if ( !empty($_POST['post_message']) && is_string($_POST['post_message']) ) { $error = array(); --- 34,38 ---- // ! if ( !empty($_POST['post_message']) && is_string($_POST['post_message']) && $admin->posttime < (time()-$functions->get_config('antispam'))) { $error = array(); Index: index.php =================================================================== RCS file: /cvsroot/usebook/UseBook/index.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** index.php 7 Jul 2005 16:38:09 -0000 1.6 --- index.php 28 Jul 2005 10:16:50 -0000 1.7 *************** *** 56,60 **** $pages .= '<b>'.$i.'</b> '; else ! $pages .= '<a href="index.php?page='.$i.'">'.$i.'</a> '; } --- 56,60 ---- $pages .= '<b>'.$i.'</b> '; else ! $pages .= '<a href="'.$functions->make_url('index.php',array('page' => $i)).'">'.$i.'</a> '; } *************** *** 77,81 **** 'name' => $posts['name'], 'mail' => ( !empty($posts['mail']) ) ? $lang['Email'].': '.$functions->show_email($posts['mail']) : '', ! 'site' => ( !empty($posts['site']) ) ? $lang['Website'].': '.$posts['site'] : '', 'date' => $functions->make_date($posts['date']), 'post' => $functions->markup($posts['post'])) ); --- 77,81 ---- 'name' => $posts['name'], 'mail' => ( !empty($posts['mail']) ) ? $lang['Email'].': '.$functions->show_email($posts['mail']) : '', ! 'site' => ( !empty($posts['site']) ) ? $lang['Website'].': <a href="'.$posts['site'].'" target="_BLANK">'.$posts['site'].'</a>' : '', 'date' => $functions->make_date($posts['date']), 'post' => $functions->markup($posts['post'])) ); |
From: Vandamme S. <kid...@us...> - 2005-07-28 10:16:35
|
Update of /cvsroot/usebook/UseBook/sources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13141/sources Modified Files: core.php db_mysql.php db_mysqli.php functions.php page_foot.php page_head.php template.php Log Message: UseBook 0.3 RC Index: functions.php =================================================================== RCS file: /cvsroot/usebook/UseBook/sources/functions.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** functions.php 7 Jul 2005 16:40:42 -0000 1.4 --- functions.php 28 Jul 2005 10:16:19 -0000 1.5 *************** *** 30,33 **** --- 30,46 ---- exit(); + + // + // Replacement for htmlspecialchars() + // Doesn't mess up Cyrillic (and other) characters + // which are sent in entities by a browser + // + function unhtml($string) { + + return preg_replace(array('#&#', '#&\#([0-9]+)#', '#&\#(160|173|8192|8193|8194|8195|8196|8197|8198|8199|8120|8201|8202|8203|8204|8205|8206|8207)#', '#<#', '#>#', '#"#'), array('&', '&#\\1', '&#\\1', '<', '>', '"'), $string); + + } + + class functions { // *************** *** 396,400 **** function make_url($filename, $vars=array(), $html=true) { - if ( $this->get_config('friendly_urls') && $filename != 'admin.php' ) { --- 409,412 ---- Index: page_head.php =================================================================== RCS file: /cvsroot/usebook/UseBook/sources/page_head.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** page_head.php 3 Jun 2005 15:32:10 -0000 1.3 --- page_head.php 28 Jul 2005 10:16:19 -0000 1.4 *************** *** 37,42 **** 'character_encoding' => $character_encoding, 'language_code' => ( !empty($lang['language_code']) ) ? $lang['language_code'] : 'en', ! 'css_url' => 'css.php', 'gb_name' => $functions->get_config('gb_name'), 'gb_descr' => $functions->get_config('gb_descr') )); --- 37,43 ---- 'character_encoding' => $character_encoding, 'language_code' => ( !empty($lang['language_code']) ) ? $lang['language_code'] : 'en', ! 'css_url' => ROOT_PATH.'css.php', 'gb_name' => $functions->get_config('gb_name'), + 'gb_url' => $functions->make_url(ROOT_PATH.'index.php'), 'gb_descr' => $functions->get_config('gb_descr') )); Index: db_mysql.php =================================================================== RCS file: /cvsroot/usebook/UseBook/sources/db_mysql.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** db_mysql.php 3 Jun 2005 15:32:10 -0000 1.3 --- db_mysql.php 28 Jul 2005 10:16:19 -0000 1.4 *************** *** 2,18 **** /* ! Copyright (C) 2005 UseBook Team ! http://usebook.sourceforge.net $Header$ ! This file is part of UseBook. ! UseBook is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. ! UseBook is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- 2,18 ---- /* ! Copyright (C) 2003-2005 UseBB Team ! http://www.usebb.net $Header$ ! This file is part of UseBB. ! UseBB is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. ! UseBB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *************** *** 20,24 **** You should have received a copy of the GNU General Public License ! along with UseBook; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ --- 20,24 ---- You should have received a copy of the GNU General Public License ! along with UseBB; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ *************** *** 33,36 **** --- 33,38 ---- trigger_error('Unable to load module for database server "mysql": PHP mysql extension not available!'); + @ini_set('mysql.trace_mode', '0'); + // // Create the MySQL handlers *************** *** 43,47 **** var $connection; var $queries = array(); - var $results = array(); // --- 45,48 ---- *************** *** 65,76 **** // Execute database queries // ! function query($query) { global $functions; $this->queries[] = preg_replace('#\s+#', ' ', $query); ! $result = @mysql_query($query, $this->connection) or trigger_error('SQL: '.mysql_error()); ! if ( $functions->get_config('auto_free_sql_results') && is_resource($result) ) ! $this->results[] = $result; return $result; --- 66,83 ---- // Execute database queries // ! function query($query, $return_error=false) { global $functions; $this->queries[] = preg_replace('#\s+#', ' ', $query); ! $result = @mysql_query($query, $this->connection) or $error = mysql_error(); ! if ( isset($error) ) { ! ! if ( $return_error ) ! return $error; ! else ! trigger_error('SQL: '.$error); ! ! } return $result; *************** *** 114,129 **** // ! // Disconnect the database connection // ! function disconnect() { ! global $functions; ! if ( $functions->get_config('auto_free_sql_results') ) { ! ! foreach ( $this->results as $result ) ! @mysql_free_result($result); ! ! } @mysql_close($this->connection); --- 121,139 ---- // ! // Get server version info // ! function get_server_info() { ! return array( ! 'MySQL', ! mysql_get_server_info($this->connection) ! ); ! } ! ! // ! // Disconnect the database connection ! // ! function disconnect() { @mysql_close($this->connection); Index: template.php =================================================================== RCS file: /cvsroot/usebook/UseBook/sources/template.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** template.php 3 Jun 2005 15:32:11 -0000 1.3 --- template.php 28 Jul 2005 10:16:19 -0000 1.4 *************** *** 2,18 **** /* ! Copyright (C) 2005 UseBook Team ! http://usebook.sourceforge.net $Header$ ! This file is part of UseBook. ! UseBook is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. ! UseBook is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- 2,18 ---- /* ! Copyright (C) 2003-2005 UseBB Team ! http://www.usebb.net $Header$ ! This file is part of UseBB. ! UseBB is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. ! UseBB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *************** *** 20,24 **** You should have received a copy of the GNU General Public License ! along with UseBook; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ --- 20,24 ---- You should have received a copy of the GNU General Public License ! along with UseBB; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ *************** *** 38,47 **** // Variables // var $parse_special_templates_only = false; ! var $loaded_sections=array(); ! var $templates=array(); ! var $requests=array(); ! var $global_vars=array(); ! var $body=''; // --- 38,62 ---- // Variables // + var $content_type = ''; + var $character_encoding = ''; var $parse_special_templates_only = false; ! var $loaded_sections = array(); ! var $templates = array(); ! var $requests = array(); ! var $global_vars = array(); ! var $raw_contents = array(); ! var $body = ''; ! ! // ! // Activate gzip compression if needed, BEFORE doing a session_start() ! // ! function template() { ! ! global $functions; ! ! if ( !defined('NO_GZIP') && ( $functions->get_config('output_compression') === 2 || $functions->get_config('output_compression') === 3 ) && !@ini_get('zlib.output_compression') ) ! ob_start('ob_gzhandler'); ! ! } // *************** *** 75,84 **** global $functions; - // - // Load the template set - // $this->load_section('global'); ! if ( isset($this->templates['global']['config'][$setting]) ) return $this->templates['global']['config'][$setting]; elseif ( !$functions->get_config('hide_undefined_template_setting_warnings') ) --- 90,96 ---- global $functions; $this->load_section('global'); ! if ( array_key_exists($setting, $this->templates['global']['config']) ) return $this->templates['global']['config'][$setting]; elseif ( !$functions->get_config('hide_undefined_template_setting_warnings') ) *************** *** 106,110 **** if ( !array_key_exists($name, $this->templates[$section]) ) { ! if ( !$config['hide_undefined_template_warnings'] ) trigger_error('Unable to load "'.$name.'" template in '.$section.' templates file for set "'.$functions->get_config('template').'"!'); else --- 118,122 ---- if ( !array_key_exists($name, $this->templates[$section]) ) { ! if ( !$functions->get_config('hide_undefined_template_warnings') ) trigger_error('Unable to load "'.$name.'" template in '.$section.' templates file for set "'.$functions->get_config('template').'"!'); else *************** *** 124,132 **** // Add global template variables // ! function add_global_vars($variables) { foreach ( $variables as $key => $val ) { ! if ( !array_key_exists($key, $this->global_vars) ) $this->global_vars[$key] = $val; --- 136,144 ---- // Add global template variables // ! function add_global_vars($variables, $override=false) { foreach ( $variables as $key => $val ) { ! if ( $override || !array_key_exists($key, $this->global_vars) ) $this->global_vars[$key] = $val; *************** *** 145,149 **** 'page_title' => strip_tags($page_title), 'location_bar' => '<a href="'.$functions->make_url('index.php').'">'.unhtml($functions->get_config('board_name')).'</a>'.$this->get_config('locationbar_item_delimiter').$page_title ! )); } --- 157,186 ---- 'page_title' => strip_tags($page_title), 'location_bar' => '<a href="'.$functions->make_url('index.php').'">'.unhtml($functions->get_config('board_name')).'</a>'.$this->get_config('locationbar_item_delimiter').$page_title ! ), true); ! ! } ! ! // ! // Add raw content, used for the ACP ! // ! function add_raw_content($content) { ! ! $this->requests[] = array( ! 'raw' => true, ! 'num' => count($this->raw_contents) ! ); ! ! $this->raw_contents[] = $content; ! ! } ! ! // ! // Set the Javascript onload statement ! // ! function set_js_onload($statement) { ! ! $this->add_global_vars(array( ! 'js_onload' => ' onload="javascript:'.$statement.'"' ! ), true); } *************** *** 152,163 **** // Output the page body // ! function body($enable_debugmessages=true) { ! global $db, $functions, $timer, $lang; // // Debug features // ! if ( $functions->get_config('debug') && $enable_debugmessages ) { // --- 189,214 ---- // Output the page body // ! function body() { ! global $db, $functions, $timer, $lang, $session; ! ! // ! // Eventually set the content type and charset ! // ! $content_type = $this->get_config('content_type'); ! if ( empty($this->content_type) ) ! $this->content_type = ( !empty($content_type) ) ? $content_type : 'text/html'; ! if ( empty($this->character_encoding) ) ! $this->character_encoding = $lang['character_encoding']; ! ! // ! // Set content type and charset ! // ! header('Content-Type: '.$this->content_type.'; charset='.$this->character_encoding); // // Debug features // ! if ( $functions->get_config('debug') ) { // *************** *** 166,170 **** $timer['end'] = explode(' ', microtime()); $timer['end'] = (float)$timer['end'][1] + (float)$timer['end'][0]; ! $parsetime = round($timer['end'] - $timer['begin'], 2); $debug_info = array(); --- 217,221 ---- $timer['end'] = explode(' ', microtime()); $timer['end'] = (float)$timer['end'][1] + (float)$timer['end'][0]; ! $parsetime = round($timer['end'] - $timer['begin'], 4); $debug_info = array(); *************** *** 189,193 **** // $debug_info_small = ''; ! $debug_info_large = sprintf($this->get_config('debug_info_large'), '<div><strong>'.$lang['DebugMode'].'</strong>'.$this->get_config('item_delimiter').join($this->get_config('item_delimiter'), $debug_info).':</div><textarea rows="10" cols="50" readonly="readonly">'.join("\n\n", $db->get_used_queries()).'</textarea>'); } --- 240,244 ---- // $debug_info_small = ''; ! $debug_info_large = sprintf($this->get_config('debug_info_large'), '<div><strong>'.$lang['DebugMode'].'</strong>'.$this->get_config('item_delimiter').join($this->get_config('item_delimiter'), $debug_info).':</div><textarea rows="10" cols="50" readonly="readonly">'.unhtml(join("\n\n", $db->get_used_queries())).'</textarea>'); } *************** *** 205,214 **** --- 256,287 ---- // + // Add some global template variables such as content type and charset + // + $this->add_global_vars(array( + 'content_type' => $this->content_type, + 'character_encoding' => $this->character_encoding, + 'language_code' => ( !empty($lang['language_code']) ) ? $lang['language_code'] : 'en', + 'text_direction' => ( !empty($lang['text_direction']) ) ? $lang['text_direction'] : 'ltr', + 'img_dir' => ROOT_PATH.'templates/'.$functions->get_config('template').'/gfx/', + 'css_url' => ROOT_PATH.'templates/'.$functions->get_config('template').'/styles.css', + 'acp_css_head_link' => ( $session->sess_info['location'] == 'admin' ) ? '<link rel="stylesheet" type="text/css" href="'.ROOT_PATH.'templates/'.$functions->get_config('template').'/admin.css" />' : '', + 'js_onload' => '' + )); + + // // Parse all templates // foreach ( $this->requests as $request ) { + if ( isset($request['raw']) ) { + + $this->body .= "\n".$this->raw_contents[$request['num']]."\n"; + continue; + + } + $current_template = $this->templates[$request['section']][$request['template_name']]; $finds = $replaces = array(); + if ( preg_match('#\{l_[a-zA-Z]+\}#', $current_template) ) { *************** *** 225,230 **** } ! $request['variables']['img_dir'] = ROOT_PATH.'templates/'.$functions->get_config('template').'/gfx/'; $request['variables'] = array_merge($this->global_vars, $request['variables']); foreach ( $request['variables'] as $key => $val ) { --- 298,304 ---- } ! $request['variables'] = array_merge($this->global_vars, $request['variables']); + foreach ( $request['variables'] as $key => $val ) { *************** *** 233,241 **** } ! foreach ( $replaces as $key => $val ) { ! $replaces[$key] = preg_replace(array('#\{#', '#\}#'), array('{', '}'), $val); ! ! } $current_template = preg_replace($finds, $replaces, $current_template); $this->body .= $current_template; --- 307,314 ---- } ! ! foreach ( $replaces as $key => $val ) $replaces[$key] = preg_replace(array('#\{#', '#\}#'), array('{', '}'), $val); ! $current_template = preg_replace($finds, $replaces, $current_template); $this->body .= $current_template; Index: db_mysqli.php =================================================================== RCS file: /cvsroot/usebook/UseBook/sources/db_mysqli.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** db_mysqli.php 3 Jun 2005 15:32:10 -0000 1.3 --- db_mysqli.php 28 Jul 2005 10:16:19 -0000 1.4 *************** *** 2,18 **** /* ! Copyright (C) 2005 UseBook Team ! http://usebook.sourceforge.net $Header$ ! This file is part of UseBook. ! UseBook is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. ! UseBook is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- 2,18 ---- /* ! Copyright (C) 2003-2005 UseBB Team ! http://www.usebb.net $Header$ ! This file is part of UseBB. ! UseBB is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. ! UseBB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *************** *** 20,24 **** You should have received a copy of the GNU General Public License ! along with UseBook; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ --- 20,24 ---- You should have received a copy of the GNU General Public License ! along with UseBB; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ *************** *** 33,36 **** --- 33,38 ---- trigger_error('Unable to load module for database server "mysqli": PHP mysqli extension not available!'); + @ini_set('mysql.trace_mode', '0'); + // // Create the MySQL handlers *************** *** 43,47 **** var $connection; var $queries = array(); - var $results = array(); // --- 45,48 ---- *************** *** 65,76 **** // Execute database queries // ! function query($query) { global $functions; $this->queries[] = preg_replace('#\s+#', ' ', $query); ! $result = @mysqli_query($query, $this->connection) or trigger_error('SQL: '.mysqli_error()); ! if ( $functions->get_config('auto_free_sql_results') && is_resource($result) ) ! $this->results[] = $result; return $result; --- 66,83 ---- // Execute database queries // ! function query($query, $return_error=false) { global $functions; $this->queries[] = preg_replace('#\s+#', ' ', $query); ! $result = @mysqli_query($query, $this->connection) or $error = mysqli_error(); ! if ( isset($error) ) { ! ! if ( $return_error ) ! return $error; ! else ! trigger_error('SQL: '.$error); ! ! } return $result; *************** *** 114,129 **** // ! // Disconnect the database connection // ! function disconnect() { ! global $functions; ! if ( $functions->get_config('auto_free_sql_results') ) { ! ! foreach ( $this->results as $result ) ! @mysqli_free_result($result); ! ! } @mysqli_close($this->connection); --- 121,139 ---- // ! // Get server version info // ! function get_server_info() { ! return array( ! 'MySQL (mysqli)', ! mysqli_get_server_info($this->connection) ! ); ! } ! ! // ! // Disconnect the database connection ! // ! function disconnect() { @mysqli_close($this->connection); Index: core.php =================================================================== RCS file: /cvsroot/usebook/UseBook/sources/core.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** core.php 7 Jul 2005 16:40:42 -0000 1.4 --- core.php 28 Jul 2005 10:16:19 -0000 1.5 *************** *** 76,81 **** // Create objects // - $template = new template(); $functions = new functions(); // --- 76,81 ---- // Create objects // $functions = new functions(); + $template = new template(); // Index: page_foot.php =================================================================== RCS file: /cvsroot/usebook/UseBook/sources/page_foot.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** page_foot.php 3 Jun 2005 15:32:10 -0000 1.3 --- page_foot.php 28 Jul 2005 10:16:19 -0000 1.4 *************** *** 33,37 **** // Footer // ! $template->parse('normal_footer', 'global'); // --- 33,40 ---- // Footer // ! $template->parse('normal_footer', 'global', array( ! 'url_admin' => $functions->make_url(ROOT_PATH.'admin/admin.php'), ! 'url_stats' => $functions->make_url(ROOT_PATH.'stats.php') ! )); // |
From: Vandamme S. <kid...@us...> - 2005-07-07 16:41:01
|
Update of /cvsroot/usebook/UseBook/sources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9234/sources Modified Files: core.php functions.php Log Message: - Implented posts per page - Added New posts on top or bottom of pages - Fixed posts id bug - Added friendly url's Index: functions.php =================================================================== RCS file: /cvsroot/usebook/UseBook/sources/functions.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** functions.php 3 Jun 2005 15:32:10 -0000 1.3 --- functions.php 7 Jul 2005 16:40:42 -0000 1.4 *************** *** 390,393 **** --- 390,443 ---- return $this->config[$value]; } + + // + // Interactive URL builder + // + function make_url($filename, $vars=array(), $html=true) { + + + if ( $this->get_config('friendly_urls') && $filename != 'admin.php' ) { + + $url = str_replace('.php', '', $filename); + foreach ( $vars as $key => $val ) { + + if ( in_array($key, array('index')) ) + $url .= '-'.$key.$val; + else + $url .= '-'.$val; + + } + if ( $filename == 'rss.php' ) + return $url.'.xml'; + else + return $url.'.html'; + + } + + $url = $filename; + $vars = ( is_array($vars) ) ? $vars : array(); + + if ( count($vars) ) { + + $url .= '?'; + + if ( $html ) { + + foreach ( $vars as $key => $val ) + $safe[] = urlencode($key).'='.urlencode($val); + $url .= join('&', $safe); + + } else { + + foreach ( $vars as $key => $val ) + $safe[] = $key.'='.$val; + $url .= join('&', $safe); + + } + + } + return $url; + + } } Index: core.php =================================================================== RCS file: /cvsroot/usebook/UseBook/sources/core.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** core.php 3 Jun 2005 15:32:10 -0000 1.3 --- core.php 7 Jul 2005 16:40:42 -0000 1.4 *************** *** 58,64 **** // require(ROOT_PATH.'config.php'); ! require('functions.php'); ! require('template.php'); ! require('admin.php'); // --- 58,64 ---- // require(ROOT_PATH.'config.php'); ! require(ROOT_PATH.'sources/functions.php'); ! require(ROOT_PATH.'sources/template.php'); ! require(ROOT_PATH.'sources/admin.php'); // *************** *** 67,71 **** define('TABLE_PREFIX', $database['prefix']); define('COOKIE_PREFIX', $config['cookie_prefix']); ! define('USEBOOK_VERSION', '0.2'); define('USER_PREG', '#^[A-Za-z0-9_\-]+$#'); define('EMAIL_PREG', '#^[a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+$#'); --- 67,71 ---- define('TABLE_PREFIX', $database['prefix']); define('COOKIE_PREFIX', $config['cookie_prefix']); ! define('USEBOOK_VERSION', '0.3-CVS'); define('USER_PREG', '#^[A-Za-z0-9_\-]+$#'); define('EMAIL_PREG', '#^[a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+$#'); |
From: Vandamme S. <kid...@us...> - 2005-07-07 16:40:23
|
Update of /cvsroot/usebook/UseBook/templates/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8445/templates/default Modified Files: global.tpl.php posts.tpl.php Log Message: - Implented posts per page - Added New posts on top or bottom of pages - Fixed posts id bug - Added friendly url's Index: global.tpl.php =================================================================== RCS file: /cvsroot/usebook/UseBook/templates/default/global.tpl.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** global.tpl.php 18 Jun 2005 12:29:46 -0000 1.4 --- global.tpl.php 7 Jul 2005 16:40:07 -0000 1.5 *************** *** 611,614 **** --- 611,617 ---- $templates['normal_footer'] = ' + <p id="linkbar"> + <a href="{url_admin}">{l_Admin}</a> · <a href="{url_stats}">{l_Stats}</a> + </p> <address id="bottom"> <!-- Index: posts.tpl.php =================================================================== RCS file: /cvsroot/usebook/UseBook/templates/default/posts.tpl.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** posts.tpl.php 22 Jun 2005 07:13:34 -0000 1.5 --- posts.tpl.php 7 Jul 2005 16:40:07 -0000 1.6 *************** *** 58,62 **** </td> <td class="postinfo"> ! <div class="postdate"><a href="index.php?post=1706#post1706" name="post1706">#{id}</a> {date}</div> </td> </tr> --- 58,62 ---- </td> <td class="postinfo"> ! <div class="postdate">{id} {date}</div> </td> </tr> |
From: Vandamme S. <kid...@us...> - 2005-07-07 16:39:57
|
Update of /cvsroot/usebook/UseBook/templates/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8230/templates/default Added Files: admin.tpl.php Log Message: Initial Commit. --- NEW FILE: admin.tpl.php --- <?php /* Copyright (C) 2005 UseBook Team http://usebook.sourceforge.net $Header: /cvsroot/usebook/UseBook/templates/default/admin.tpl.php,v 1.1 2005/07/07 16:39:43 kidkiller Exp $ This file is part of UseBook. UseBook is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. UseBook is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with UseBook; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ // // Die when called directly in browser // if ( !defined('INCLUDED') ) exit(); // // Initialize a new template holder array // $templates = array(); // // Login // $templates['admin_login'] = ' <form method="POST" action="{location}"> <table class="maintable"> <tr> <th colspan=2>{l_Admin}</hr> </tr> <tr> <td>{l_Username}</td><td>{username}</td> </tr> <tr> <td>{l_Password}</td><td>{password}</td> </tr> <tr> <td colspan=2 class="formcontrols"><input type="submit" name="Submit" value="{l_Send}"> <input type="reset" value="{l_Reset}" /></td> </tr> </table> </form>'; ?> |
From: Vandamme S. <kid...@us...> - 2005-07-07 16:39:12
|
Update of /cvsroot/usebook/UseBook/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7926/admin Added Files: admin.php Log Message: Initial Commit. --- NEW FILE: admin.php --- <?php /* Copyright (C) 2005 UseBook Team http://usebook.sourceforge.net $Header: /cvsroot/usebook/UseBook/admin/admin.php,v 1.1 2005/07/07 16:39:03 kidkiller Exp $ This file is part of UseBook. UseBook is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. UseBook is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with UseBook; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ define('INCLUDED', true); define('ROOT_PATH', './'); // // Load engine // require('sources/core.php'); // // Page head // require('sources/page_head.php'); // // Admin // $template->parse('admin_login', 'admin', array( ); // // Page bottom // require('sources/page_foot.php'); ?> |
From: Vandamme S. <kid...@us...> - 2005-07-07 16:38:40
|
Update of /cvsroot/usebook/UseBook/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7467/admin Log Message: Directory /cvsroot/usebook/UseBook/admin added to the repository |
From: Vandamme S. <kid...@us...> - 2005-07-07 16:38:17
|
Update of /cvsroot/usebook/UseBook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7275 Modified Files: changelog.txt config.php index.php Log Message: - Implented posts per page - Added New posts on top or bottom of pages - Fixed posts id bug - Added friendly url's Index: changelog.txt =================================================================== RCS file: /cvsroot/usebook/UseBook/changelog.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** changelog.txt 22 Jun 2005 07:13:15 -0000 1.5 --- changelog.txt 7 Jul 2005 16:38:09 -0000 1.6 *************** *** 7,13 **** - 1st Anti spam feature added - Implented posts per page - Some small adjustments - UseBook 0.2 Changelog ------------------------------ --- 7,15 ---- - 1st Anti spam feature added - Implented posts per page + - Added New posts on top or bottom of pages + - Fixed posts id bug + - Added friendly url's - Some small adjustments UseBook 0.2 Changelog ------------------------------ Index: config.php =================================================================== RCS file: /cvsroot/usebook/UseBook/config.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** config.php 22 Jun 2005 07:13:15 -0000 1.5 --- config.php 7 Jul 2005 16:38:09 -0000 1.6 *************** *** 65,68 **** --- 65,69 ---- $config['needed_website'] = 0; $config['antispam'] = 900; + $config['post_order'] = 1; // *************** *** 78,81 **** --- 79,83 ---- $config['rel_nofollow'] = 0; $config['auto_free_sql_results'] = 1; + $config['friendly_urls'] = 0; // Index: index.php =================================================================== RCS file: /cvsroot/usebook/UseBook/index.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** index.php 22 Jun 2005 07:13:15 -0000 1.5 --- index.php 7 Jul 2005 16:38:09 -0000 1.6 *************** *** 51,63 **** $posts = $db->num_rows($data); ! $pages = '<p>'; for ( $i = 0; $i != ceil($posts/$functions->get_config('posts_page')); $i++ ) { if ( $i == $page ) ! $pages .= '['.$i.'] '; else $pages .= '<a href="index.php?page='.$i.'">'.$i.'</a> '; } ! $data = $db->query('SELECT * FROM '.TABLE_PREFIX.'posts ORDER BY id DESC LIMIT '.$functions->get_config('posts_page')*$page.', '.$functions->get_config('posts_page')); if ( $db->num_rows($data) == 0 ) --- 51,65 ---- $posts = $db->num_rows($data); ! $pages = ''; for ( $i = 0; $i != ceil($posts/$functions->get_config('posts_page')); $i++ ) { if ( $i == $page ) ! $pages .= '<b>'.$i.'</b> '; else $pages .= '<a href="index.php?page='.$i.'">'.$i.'</a> '; } ! $order = ( $functions->get_config('post_order') == 1 ) ? 'DESC': 'ASC'; ! ! $data = $db->query('SELECT * FROM '.TABLE_PREFIX.'posts ORDER BY id '.$order.' LIMIT '.$functions->get_config('posts_page')*$page.', '.$functions->get_config('posts_page')); if ( $db->num_rows($data) == 0 ) *************** *** 72,76 **** $template->parse('post', 'posts', array ( 'color' => $post_color, ! 'id' => $posts['id'], 'name' => $posts['name'], 'mail' => ( !empty($posts['mail']) ) ? $lang['Email'].': '.$functions->show_email($posts['mail']) : '', --- 74,78 ---- $template->parse('post', 'posts', array ( 'color' => $post_color, ! 'id' => ( $admin->login ) ? '<a href="'.$functions->make_url('stats.php', array('id' => $posts['id'])).'">'.$posts['id'].'</a>' : '#'.$posts['id'], 'name' => $posts['name'], 'mail' => ( !empty($posts['mail']) ) ? $lang['Email'].': '.$functions->show_email($posts['mail']) : '', *************** *** 99,103 **** 'message' => '<textarea rows="10" cols="60" name="post_message">'.$message.'</textarea>', 'website' => '<input type="text" name="post_website" size="25" maxlength="255" value="'.$website.'"/>', ! 'form_start' => '<form method="POST" action="index.php">', 'form_end' => '</form>' )); --- 101,105 ---- 'message' => '<textarea rows="10" cols="60" name="post_message">'.$message.'</textarea>', 'website' => '<input type="text" name="post_website" size="25" maxlength="255" value="'.$website.'"/>', ! 'form_start' => '<form method="POST" action="'.$functions->make_url('index.php').'">', 'form_end' => '</form>' )); |
From: Vandamme S. <kid...@us...> - 2005-06-22 07:13:52
|
Update of /cvsroot/usebook/UseBook/templates/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13564/templates/default Modified Files: posts.tpl.php Log Message: posts page Index: posts.tpl.php =================================================================== RCS file: /cvsroot/usebook/UseBook/templates/default/posts.tpl.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** posts.tpl.php 18 Jun 2005 12:29:46 -0000 1.4 --- posts.tpl.php 22 Jun 2005 07:13:34 -0000 1.5 *************** *** 40,44 **** $templates['post_start'] = ' <br> ! <p id="pagelinkstop">Page: TODO</p> <table class="maintable"> <tr> --- 40,44 ---- $templates['post_start'] = ' <br> ! <p id="pagelinkstop">Page: {pages}</p> <table class="maintable"> <tr> |
From: Vandamme S. <kid...@us...> - 2005-06-22 07:13:24
|
Update of /cvsroot/usebook/UseBook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13357 Modified Files: changelog.txt config.php index.php Log Message: posts page Index: changelog.txt =================================================================== RCS file: /cvsroot/usebook/UseBook/changelog.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** changelog.txt 18 Jun 2005 12:28:37 -0000 1.4 --- changelog.txt 22 Jun 2005 07:13:15 -0000 1.5 *************** *** 6,11 **** --- 6,13 ---- - Moved post machine to different file - 1st Anti spam feature added + - Implented posts per page - Some small adjustments + UseBook 0.2 Changelog ------------------------------ Index: config.php =================================================================== RCS file: /cvsroot/usebook/UseBook/config.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** config.php 18 Jun 2005 12:28:38 -0000 1.4 --- config.php 22 Jun 2005 07:13:15 -0000 1.5 *************** *** 56,60 **** $config['closed_title']= 'Closed *****!'; $config['closed_msg'] = 'Work Work Work'; ! $config['posts_page'] = 1; $config['date_format'] = 'D M d, Y g:i a'; $config['timezone'] = 0; --- 56,60 ---- $config['closed_title']= 'Closed *****!'; $config['closed_msg'] = 'Work Work Work'; ! $config['posts_page'] = 5; $config['date_format'] = 'D M d, Y g:i a'; $config['timezone'] = 0; Index: index.php =================================================================== RCS file: /cvsroot/usebook/UseBook/index.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** index.php 18 Jun 2005 12:28:38 -0000 1.4 --- index.php 22 Jun 2005 07:13:15 -0000 1.5 *************** *** 51,60 **** $posts = $db->num_rows($data); ! $data = $db->query('SELECT * FROM '.TABLE_PREFIX.'posts ORDER BY id DESC LIMIT '.$functions->get_config('posts_page')*$page.', '.$functions->get_config('posts_page')*($page+1)); if ( $db->num_rows($data) == 0 ) $template->parse('msgbox', 'global', array('box_title' => $lang['Error'], 'content' => $lang['NoPosts']) ); else { ! $template->parse('post_start','posts'); ## Values --- 51,68 ---- $posts = $db->num_rows($data); ! $pages = '<p>'; ! for ( $i = 0; $i != ceil($posts/$functions->get_config('posts_page')); $i++ ) { ! if ( $i == $page ) ! $pages .= '['.$i.'] '; ! else ! $pages .= '<a href="index.php?page='.$i.'">'.$i.'</a> '; ! } ! ! $data = $db->query('SELECT * FROM '.TABLE_PREFIX.'posts ORDER BY id DESC LIMIT '.$functions->get_config('posts_page')*$page.', '.$functions->get_config('posts_page')); if ( $db->num_rows($data) == 0 ) $template->parse('msgbox', 'global', array('box_title' => $lang['Error'], 'content' => $lang['NoPosts']) ); else { ! $template->parse('post_start','posts',array('pages' => $pages)); ## Values |
From: Vandamme S. <kid...@us...> - 2005-06-18 12:29:59
|
Update of /cvsroot/usebook/UseBook/templates/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27477/templates/default Modified Files: global.tpl.php posts.tpl.php Log Message: Small adjustments Index: global.tpl.php =================================================================== RCS file: /cvsroot/usebook/UseBook/templates/default/global.tpl.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** global.tpl.php 3 Jun 2005 15:32:35 -0000 1.3 --- global.tpl.php 18 Jun 2005 12:29:46 -0000 1.4 *************** *** 184,188 **** #logo { float: left; - margin-bottom: 15px; } h1#boardname { --- 184,187 ---- Index: posts.tpl.php =================================================================== RCS file: /cvsroot/usebook/UseBook/templates/default/posts.tpl.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** posts.tpl.php 3 Jun 2005 15:32:35 -0000 1.3 --- posts.tpl.php 18 Jun 2005 12:29:46 -0000 1.4 *************** *** 39,42 **** --- 39,44 ---- // $templates['post_start'] = ' + <br> + <p id="pagelinkstop">Page: TODO</p> <table class="maintable"> <tr> |