You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(20) |
Sep
|
Oct
(7) |
Nov
(81) |
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(4) |
Feb
|
Mar
(6) |
Apr
(1) |
May
(2) |
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Javier B. <jb...@us...> - 2004-11-17 10:46:58
|
Update of /cvsroot/openbash-org/openbash-org/pages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10622/pages Modified Files: footer.php header.php Log Message: bug del utime Index: header.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/pages/header.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** header.php 15 Nov 2004 12:09:43 -0000 1.10 --- header.php 17 Nov 2004 10:46:48 -0000 1.11 *************** *** 12,16 **** <?php global $lang; ! $start = utime(); ?> --- 12,16 ---- <?php global $lang; ! $time_start = utime(); ?> Index: footer.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/pages/footer.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** footer.php 17 Nov 2004 10:37:39 -0000 1.10 --- footer.php 17 Nov 2004 10:46:48 -0000 1.11 *************** *** 2,7 **** <div id="footer"> <? ! $approved_sql = 'SELECT COUNT(*) FROM quote WHERE PENDING=0'; ! $pending_sql = 'SELECT COUNT(*) FROM quote WHERE PENDING=1'; $count_approved = $bd->getOne($approved_sql); $count_pending = $bd->getOne($pending_sql); --- 2,7 ---- <div id="footer"> <? ! $approved_sql = 'SELECT COUNT(*) FROM quote WHERE pending=0'; ! $pending_sql = 'SELECT COUNT(*) FROM quote WHERE pending=1'; $count_approved = $bd->getOne($approved_sql); $count_pending = $bd->getOne($pending_sql); *************** *** 22,29 **** <p> <?php ! $end = utime(); ! $run = $end - $start; printf ('<span class="time">'.$sentences['time'].': %s</span>', ! substr($run, 0, 5)); ?> </p> --- 22,29 ---- <p> <?php ! $time_end = utime(); ! $time_run = $time_end - $time_start; printf ('<span class="time">'.$sentences['time'].': %s</span>', ! substr($time_run, 0, 5)); ?> </p> |
From: José M. M. <ri...@us...> - 2004-11-17 10:37:52
|
Update of /cvsroot/openbash-org/openbash-org/pages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8588/pages Modified Files: footer.php Log Message: -Ya aparecen en el footer la cantidad de quotes pendientes de aprobación y aprobadas. Index: footer.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/pages/footer.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** footer.php 13 Aug 2004 21:05:46 -0000 1.9 --- footer.php 17 Nov 2004 10:37:39 -0000 1.10 *************** *** 1,5 **** <?php /* vim: set sts=2 ts=8 sw=2 noexpandtab: */ ?> <div id="footer"> ! <?=$sentences['approved']?>: 0 | <?=$sentences['pending']?>: 0 </div> --- 1,11 ---- <?php /* vim: set sts=2 ts=8 sw=2 noexpandtab: */ ?> <div id="footer"> ! <? ! $approved_sql = 'SELECT COUNT(*) FROM quote WHERE PENDING=0'; ! $pending_sql = 'SELECT COUNT(*) FROM quote WHERE PENDING=1'; ! $count_approved = $bd->getOne($approved_sql); ! $count_pending = $bd->getOne($pending_sql); ! ?> ! <?=$sentences['approved']?>: <?=$count_approved?> | <?=$sentences['pending']?>: <?=$count_pending?> </div> |
From: Javier B. <jb...@us...> - 2004-11-17 10:28:54
|
Update of /cvsroot/openbash-org/openbash-org/language In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6544/language Modified Files: spanish.php Log Message: mini cambios Index: spanish.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/language/spanish.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** spanish.php 16 Nov 2004 17:23:40 -0000 1.17 --- spanish.php 17 Nov 2004 10:28:40 -0000 1.18 *************** *** 50,53 **** --- 50,54 ---- 'En cuanto los BOFHs vuelvan de almorzar chequearán su validez. Gracias :D<br/><br/>'. 'En la siguiente página podrá informarse del estado de la quote.', + non_inserted => 'La quote no ha sido añadida a la base de datos, revisela o intentelo en otro momento, gracias.', pending => 'Esa quote está marcada como pendiente de aprobación, vuelva otro día. Gracias :D', non_existent => 'Esa quote no existe loco! hale tira pal índice merluzo.' |
From: Javier B. <jb...@us...> - 2004-11-17 10:28:54
|
Update of /cvsroot/openbash-org/openbash-org In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6544 Modified Files: config.php Log Message: mini cambios Index: config.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/config.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** config.php 15 Nov 2004 20:26:24 -0000 1.15 --- config.php 17 Nov 2004 10:28:40 -0000 1.16 *************** *** 15,22 **** $moderator_email = 'co...@va...'; # put here the mail address of moderators, # they will receive an email for every pending quote ! $summaries = 50; # number of quotes shown on a single page include ('adodb/adodb.inc.php'); ! $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; $bd = &NewADOConnection($tipobd); $bd->PConnect($hostbd, $userbd, $passbd, $namedb); --- 15,23 ---- $moderator_email = 'co...@va...'; # put here the mail address of moderators, # they will receive an email for every pending quote ! $summaries = 50; # number of quotes shown on a single page include ('adodb/adodb.inc.php'); ! $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; # we prefer associative arrays ! $ADODB_CACHE_DIR = 'cache/'; # directory to store sql results to speed up queries $bd = &NewADOConnection($tipobd); $bd->PConnect($hostbd, $userbd, $passbd, $namedb); |
From: Javier B. <jb...@us...> - 2004-11-17 10:28:54
|
Update of /cvsroot/openbash-org/openbash-org/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6544/modules Modified Files: Quote.php View.php Log Message: mini cambios Index: View.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/modules/View.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** View.php 16 Nov 2004 17:23:40 -0000 1.3 --- View.php 17 Nov 2004 10:28:40 -0000 1.4 *************** *** 52,63 **** } ! function inserted_quote($url) { global $quote_language;?> <p class="quote"><?=$quote_language['inserted']?></p> ! <?php $this->redirect($url); } ! function redirect($url) { ?> <meta http-equiv=Refresh CONTENT="8; URL=<?=$url?>"> --- 52,70 ---- } ! function view_inserted_quote($url) { global $quote_language;?> <p class="quote"><?=$quote_language['inserted']?></p> ! <?php $this->view_redirect($url); } ! function view_non_inserted_quote() ! { ! global $quote_language;?> ! <p class="quote"><?=$quote_language['non_inserted']?></p> ! <?php ! } ! ! function view_redirect($url) { ?> <meta http-equiv=Refresh CONTENT="8; URL=<?=$url?>"> Index: Quote.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/modules/Quote.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Quote.php 17 Nov 2004 08:08:37 -0000 1.8 --- Quote.php 17 Nov 2004 10:28:40 -0000 1.9 *************** *** 34,40 **** $ins = $bd->_Execute($sql); ! $this->mail_warning($author, $quote, $ip); ! $url = '?page=quote&action=single&quote='.$bd->Insert_ID(); ! $view->inserted_quote($url); } --- 34,44 ---- $ins = $bd->_Execute($sql); ! if ($ins === false) { ! $view->view_non_inserted_quote(); ! } else { ! $this->mail_warning($author, $quote, $ip); ! $url = '?page=quote&action=single&quote='.$bd->Insert_ID(); ! $view->view_inserted_quote($url); ! } } |
From: José M. M. <ri...@us...> - 2004-11-17 10:19:18
|
Update of /cvsroot/openbash-org/openbash-org/pages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4509/pages Modified Files: admin.php Log Message: Autentificación MUY BÁSICA. Index: admin.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/pages/admin.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** admin.php 13 Aug 2004 17:48:06 -0000 1.1 --- admin.php 17 Nov 2004 10:19:01 -0000 1.2 *************** *** 1,19 **** <?php /* vim: set sts=2 ts=8 sw=2 noexpandtab: */ ! if (isset($_GET['a_opt'])) { ! switch ($_GET['a_opt']) { ! case 'quotes': ! $admin_page = 'quotes'; ! break; ! case 'news': ! $admin_page = 'news'; ! break; ! case 'users': ! $admin_page = 'users'; ! break; ! default: ! $admin_page = 'general'; } ! } else $admin_page = 'general'; ! ! include('pages/admin_'.$admin_page.'.php'); ?> --- 1,66 ---- <?php /* vim: set sts=2 ts=8 sw=2 noexpandtab: */ ! ! if (isset($_GET['user']) && isset($_GET['pass'])) ! { ! $sql = 'SELECT FROM users WHERE login=\''.$SESSION['user'].'\''; ! $stored_pass = $bd->_Execute($sql); ! echo $stored_pass; ! if ($stored_pass == $_GET['pass']) { ! $_SESSION['logged'] = 1; ! } else { ! ?> ! <span style="color:red" />Contraseña incorrecta</span> ! <? } ! ! } ! /* ! * The user is not logged in ! */ ! if (!isset($_SESSION['logged']) || $_SESSION['logged'] == 0) ! { ! ask_password(); ! ! } else { ! /* ! * The user is logged in ! */ ! if (isset($_GET['a_opt'])) { ! ?> ! <h1><?=$admin['title']?></h1> ! <? ! switch ($_GET['a_opt']) { ! case 'quotes': ! $admin_page = 'quotes'; ! break; ! case 'news': ! $admin_page = 'news'; ! break; ! case 'users': ! $admin_page = 'users'; ! break; ! default: ! $admin_page = 'general'; ! } ! } else $admin_page = 'general'; ! ! include('pages/admin_'.$admin_page.'.php'); ! } ! ! function ask_password() ! { ! ?> ! <h1>Por favor, introduzca usuario y contraseña</h1> ! <form method="get" action=""> ! <div> ! <label for="user">Usuario:</label> <input name="user" type="text" id="user" /> ! <br /> ! <label for="pass">Contraseña:</label> <input name="pass" type="text" id="pass" /> ! <br /> ! <input type="hidden" name="page" value="admin" /> ! <input type="submit" /> ! </div> ! </form> ! <? ! } ?> |
From: Javier B. <jb...@us...> - 2004-11-17 08:08:47
|
Update of /cvsroot/openbash-org/openbash-org/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7134/modules Modified Files: Quote.php Log Message: otro bug en la consulta de insercion xD Index: Quote.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/modules/Quote.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Quote.php 17 Nov 2004 07:50:45 -0000 1.7 --- Quote.php 17 Nov 2004 08:08:37 -0000 1.8 *************** *** 19,29 **** $deleted = 0; // by default the quote is not purged, of course xD $pending = 1; // by default quote gets marked as pending until an admin validates it $sql = "INSERT INTO quote ! (`id`,`points`,`deleted`,`author`,`channel`,`network`,`pending`,`ip`) VALUES ( '', '$points', '$quote', - '$purge', '$author', '$channel', --- 19,30 ---- $deleted = 0; // by default the quote is not purged, of course xD $pending = 1; // by default quote gets marked as pending until an admin validates it + $points = 0; $sql = "INSERT INTO quote ! (`id`,`points`,`deleted`,`quote`,`author`,`channel`,`network`,`pending`,`ip`) VALUES ( '', '$points', + '$deleted', '$quote', '$author', '$channel', |
From: Javier B. <jb...@us...> - 2004-11-17 07:50:54
|
Update of /cvsroot/openbash-org/openbash-org/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4002/modules Modified Files: Quote.php Log Message: bug en consulta de insercion por culpa del campo "purge" Index: Quote.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/modules/Quote.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Quote.php 16 Nov 2004 17:23:40 -0000 1.6 --- Quote.php 17 Nov 2004 07:50:45 -0000 1.7 *************** *** 20,24 **** $pending = 1; // by default quote gets marked as pending until an admin validates it $sql = "INSERT INTO quote ! (`id`,`points`,`deleted`,`purge`,`author`,`channel`,`network`,`pending`,`ip`) VALUES ( '', --- 20,24 ---- $pending = 1; // by default quote gets marked as pending until an admin validates it $sql = "INSERT INTO quote ! (`id`,`points`,`deleted`,`author`,`channel`,`network`,`pending`,`ip`) VALUES ( '', |
From: Javier B. <jb...@us...> - 2004-11-16 17:23:50
|
Update of /cvsroot/openbash-org/openbash-org/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10959/modules Modified Files: Quote.php View.php Log Message: anyadidas vistas para varios tipos de quote y modificadas algunas rutinas Index: View.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/modules/View.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** View.php 16 Nov 2004 16:20:20 -0000 1.2 --- View.php 16 Nov 2004 17:23:40 -0000 1.3 *************** *** 30,34 **** global $quote_language;?> <p class="quote"> ! <a href="?page=quote&action=single&id=<?=$id?>" title="<?=$quote_language['permalink']?>"><b>#<?=$id?></b></a> <a href="rox=312" class="qa">+</a>(<?=$points?>) <a href="sux=312" class="qa">-</a> --- 30,34 ---- global $quote_language;?> <p class="quote"> ! <a href="?page=quote&action=single&quote=<?=$id?>" title="<?=$quote_language['permalink']?>"><b>#<?=$id?></b></a> <a href="rox=312" class="qa">+</a>(<?=$points?>) <a href="sux=312" class="qa">-</a> *************** *** 37,39 **** --- 37,67 ---- <p class="qt"><?=$quote?></p><?php } + + function view_pending_quote() + { + global $quote_language;?> + <p class="quote"><?=$quote_language['pending']?></p> + <?php + } + + function view_non_existent_quote() + { + global $quote_language;?> + <p class="quote"><?=$quote_language['non_existent']?></p> + <?php + } + + function inserted_quote($url) + { + global $quote_language;?> + <p class="quote"><?=$quote_language['inserted']?></p> + <?php $this->redirect($url); + } + + function redirect($url) + { ?> + <meta http-equiv=Refresh CONTENT="8; URL=<?=$url?>"> + <?php + } + } Index: Quote.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/modules/Quote.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Quote.php 16 Nov 2004 16:20:20 -0000 1.5 --- Quote.php 16 Nov 2004 17:23:40 -0000 1.6 *************** *** 11,14 **** --- 11,15 ---- { include ("config.php"); + $view = new view(); $quote = nl2br(variable_clean($quote)); //$author = check_email($author); *************** *** 16,23 **** $network = variable_clean($network); //$ip = check_ipv4($ip); ! $purge = 0; // by default the quote is not purged, of course xD $pending = 1; // by default quote gets marked as pending until an admin validates it $sql = "INSERT INTO quote ! (`id`,`points`,`quote`,`purge`,`author`,`channel`,`network`,`pending`,`ip`) VALUES ( '', --- 17,24 ---- $network = variable_clean($network); //$ip = check_ipv4($ip); ! $deleted = 0; // by default the quote is not purged, of course xD $pending = 1; // by default quote gets marked as pending until an admin validates it $sql = "INSERT INTO quote ! (`id`,`points`,`deleted`,`purge`,`author`,`channel`,`network`,`pending`,`ip`) VALUES ( '', *************** *** 33,36 **** --- 34,39 ---- $ins = $bd->_Execute($sql); $this->mail_warning($author, $quote, $ip); + $url = '?page=quote&action=single&quote='.$bd->Insert_ID(); + $view->inserted_quote($url); } *************** *** 39,47 **** include ("config.php"); $view = new view(); ! $sql = "SELECT points,quote,author,channel,network,ip FROM quote WHERE id='$id' AND quote.purge=0 AND pending=0"; $quote = $bd->_Execute($sql); if($quote->RecordCount() == 1) { ! $view->view_quote($id, $quote->fields['points'], $quote->fields['quote'], $quote->fields['author'], $quote->fields['channel'], $quote->fields['network'], $quote->fields['ip']); ! } else { return (0); } } --- 42,53 ---- include ("config.php"); $view = new view(); ! $sql = "SELECT points,quote,author,channel,network,ip,pending FROM quote WHERE id='$id' AND deleted=0"; $quote = $bd->_Execute($sql); if($quote->RecordCount() == 1) { ! switch($quote->fields['pending']) { ! case '0': $view->view_quote($id, $quote->fields['points'], $quote->fields['quote'], $quote->fields['author'], $quote->fields['channel'], $quote->fields['network'], $quote->fields['ip']); break; ! case '1': $view->view_pending_quote(); break; ! } ! } else { $view->view_non_existent_quote(); } } *************** *** 49,53 **** { include ("config.php"); ! $sql = "SELECT id FROM quote WHERE quote.purge=0 AND pending=0 ORDER BY id $order LIMIT $start,$end"; $ids = $bd->_Execute($sql); if($ids->RecordCount()) { --- 55,59 ---- { include ("config.php"); ! $sql = "SELECT id FROM quote WHERE deleted=0 AND pending=0 ORDER BY id $order LIMIT $start,$end"; $ids = $bd->_Execute($sql); if($ids->RecordCount()) { *************** *** 59,63 **** { include ("config.php"); ! $sql = "SELECT id FROM quote WHERE quote.purge=0 AND pending=0 ORDER BY points DESC LIMIT $top"; $ids = $bd->_Execute($sql); if($ids->RecordCount()) { --- 65,69 ---- { include ("config.php"); ! $sql = "SELECT id FROM quote WHERE deleted=0 AND pending=0 ORDER BY points DESC LIMIT $top"; $ids = $bd->_Execute($sql); if($ids->RecordCount()) { *************** *** 80,84 **** by: $author ($ip) ! * Please visit the admin page to validate: http://$_SERVER[SERVER_NAME]/?page=admin"; $from = "From: webmaster@$_SERVER[SERVER_NAME]\nReply-To: $email\nX-Mailer: VLog MSG Alert System"; mail($rcpt, $subject, $body, $from); --- 86,90 ---- by: $author ($ip) ! * Please visit the admin page to validate: http://$_SERVER[SERVER_NAME]/$_SERVER[SCRIPT_NAME]?page=admin"; $from = "From: webmaster@$_SERVER[SERVER_NAME]\nReply-To: $email\nX-Mailer: VLog MSG Alert System"; mail($rcpt, $subject, $body, $from); |
From: Javier B. <jb...@us...> - 2004-11-16 17:23:49
|
Update of /cvsroot/openbash-org/openbash-org/language In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10959/language Modified Files: spanish.php Log Message: anyadidas vistas para varios tipos de quote y modificadas algunas rutinas Index: spanish.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/language/spanish.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** spanish.php 16 Nov 2004 14:56:17 -0000 1.16 --- spanish.php 16 Nov 2004 17:23:40 -0000 1.17 *************** *** 46,51 **** $quote_language = array ( permalink => 'Enlace permanente a esta quote.', ! review => '¿Marcar esta quote para revisión?' ); ?> - --- 46,55 ---- $quote_language = array ( permalink => 'Enlace permanente a esta quote.', ! review => '¿Marcar esta quote para revisión?', ! inserted => 'La quote ha sido guardada y marcada como pendiente para revisión.<br/><br/>'. ! 'En cuanto los BOFHs vuelvan de almorzar chequearán su validez. Gracias :D<br/><br/>'. ! 'En la siguiente página podrá informarse del estado de la quote.', ! pending => 'Esa quote está marcada como pendiente de aprobación, vuelva otro día. Gracias :D', ! non_existent => 'Esa quote no existe loco! hale tira pal índice merluzo.' ); ?> |
From: Javier B. <jb...@us...> - 2004-11-16 17:23:49
|
Update of /cvsroot/openbash-org/openbash-org/pages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10959/pages Modified Files: quote.php Log Message: anyadidas vistas para varios tipos de quote y modificadas algunas rutinas Index: quote.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/pages/quote.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** quote.php 16 Nov 2004 10:46:14 -0000 1.3 --- quote.php 16 Nov 2004 17:23:41 -0000 1.4 *************** *** 20,23 **** --- 20,24 ---- case 'insert': $ip = get_ipaddr(); $quote->insert_quote($_POST['quote'], $_POST['author'], $_POST['channel'], $_POST['network'], $ip); break; + case 'single': $quote->get_quote($_GET['quote']); break; default: $quote->get_quotes_by_random($start, $end); break; //defaults to random } |
From: Javier B. <jb...@us...> - 2004-11-16 16:27:18
|
Update of /cvsroot/openbash-org/openbash-org In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29943 Modified Files: openbash-org.mysql Log Message: mas cambios bbdd: purge cambiado a deleted y datetime a ndate por ser palabras reservadas Index: openbash-org.mysql =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/openbash-org.mysql,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** openbash-org.mysql 16 Nov 2004 16:20:11 -0000 1.9 --- openbash-org.mysql 16 Nov 2004 16:27:06 -0000 1.10 *************** *** 7,11 **** `points` INT DEFAULT '0' NOT NULL , `quote` LONGTEXT NOT NULL , ! `purge` BOOL DEFAULT '0' NOT NULL , `author` VARCHAR( 100 ) NOT NULL , `channel` VARCHAR (50) NOT NULL , --- 7,11 ---- `points` INT DEFAULT '0' NOT NULL , `quote` LONGTEXT NOT NULL , ! `deleted` BOOL DEFAULT '0' NOT NULL , `author` VARCHAR( 100 ) NOT NULL , `channel` VARCHAR (50) NOT NULL , *************** *** 20,24 **** `id` BIGINT UNSIGNED NOT NULL auto_increment , `author` VARCHAR( 255 ) DEFAULT 'admin' NOT NULL , ! `datetime` TIMESTAMP NOT NULL , `title` VARCHAR( 255 ) NOT NULL , `body` VARCHAR( 255 ) NOT NULL , --- 20,24 ---- `id` BIGINT UNSIGNED NOT NULL auto_increment , `author` VARCHAR( 255 ) DEFAULT 'admin' NOT NULL , ! `ndate` TIMESTAMP NOT NULL , `title` VARCHAR( 255 ) NOT NULL , `body` VARCHAR( 255 ) NOT NULL , |
From: Javier B. <jb...@us...> - 2004-11-16 16:20:34
|
Update of /cvsroot/openbash-org/openbash-org/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27621/modules Modified Files: Quote.php View.php Log Message: campo ip de la bd puesto a 16, pending a bool; retocada funcion get_quotes_by_top Index: View.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/modules/View.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** View.php 16 Nov 2004 10:46:14 -0000 1.1 --- View.php 16 Nov 2004 16:20:20 -0000 1.2 *************** *** 30,34 **** global $quote_language;?> <p class="quote"> ! <a href="" title="<?=$quote_language['permalink']?>"><b>#<?=$id?></b></a> <a href="rox=312" class="qa">+</a>(<?=$points?>) <a href="sux=312" class="qa">-</a> --- 30,34 ---- global $quote_language;?> <p class="quote"> ! <a href="?page=quote&action=single&id=<?=$id?>" title="<?=$quote_language['permalink']?>"><b>#<?=$id?></b></a> <a href="rox=312" class="qa">+</a>(<?=$points?>) <a href="sux=312" class="qa">-</a> Index: Quote.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/modules/Quote.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Quote.php 16 Nov 2004 10:46:14 -0000 1.4 --- Quote.php 16 Nov 2004 16:20:20 -0000 1.5 *************** *** 59,70 **** { include ("config.php"); ! $sql = "SELECT id FROM quote purge=0 AND pending=0 ORDER BY points LIMIT $top"; $ids = $bd->_Execute($sql); ! if($ids->RecordCount()) { ?> ! <table cellpadding="2" cellspacing="0" width="80%"> ! <tr><td><?php ! while (!$ids->EOF) { $this->get_quote($ids->fields['id']); $ids->MoveNext(); } ?> ! </td></tr> ! </table><?php } else { return (0); } } --- 59,69 ---- { include ("config.php"); ! $sql = "SELECT id FROM quote WHERE quote.purge=0 AND pending=0 ORDER BY points DESC LIMIT $top"; $ids = $bd->_Execute($sql); ! if($ids->RecordCount()) { ! while (!$ids->EOF) { ! $this->get_quote($ids->fields['id']); ! $ids->MoveNext(); ! } } else { return (0); } } |
From: Javier B. <jb...@us...> - 2004-11-16 16:20:34
|
Update of /cvsroot/openbash-org/openbash-org In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27621 Modified Files: openbash-org.mysql Log Message: campo ip de la bd puesto a 16, pending a bool; retocada funcion get_quotes_by_top Index: openbash-org.mysql =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/openbash-org.mysql,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** openbash-org.mysql 8 Oct 2004 15:55:48 -0000 1.8 --- openbash-org.mysql 16 Nov 2004 16:20:11 -0000 1.9 *************** *** 7,16 **** `points` INT DEFAULT '0' NOT NULL , `quote` LONGTEXT NOT NULL , ! `purge` INT DEFAULT '0' NOT NULL , `author` VARCHAR( 100 ) NOT NULL , `channel` VARCHAR (50) NOT NULL , `network` VARCHAR (50) NOT NULL , `pending` BOOL DEFAULT 1 NOT NULL , ! `ip` VARCHAR ( 12 ) NOT NULL , PRIMARY KEY ( `id` ) ) TYPE = InnoDB; --- 7,16 ---- `points` INT DEFAULT '0' NOT NULL , `quote` LONGTEXT NOT NULL , ! `purge` BOOL DEFAULT '0' NOT NULL , `author` VARCHAR( 100 ) NOT NULL , `channel` VARCHAR (50) NOT NULL , `network` VARCHAR (50) NOT NULL , `pending` BOOL DEFAULT 1 NOT NULL , ! `ip` VARCHAR ( 16 ) NOT NULL , PRIMARY KEY ( `id` ) ) TYPE = InnoDB; |
From: José M. M. <ri...@us...> - 2004-11-16 14:56:27
|
Update of /cvsroot/openbash-org/openbash-org/language In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4921 Modified Files: spanish.php Log Message: De hecho, faltaban dos Index: spanish.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/language/spanish.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** spanish.php 16 Nov 2004 14:52:32 -0000 1.15 --- spanish.php 16 Nov 2004 14:56:17 -0000 1.16 *************** *** 38,42 **** $admin = array ( title => 'Panel de administración', ! welcome => 'Por favor, elige una opción de la siguiente lista:', quotes => 'Administrar frases', news => 'Administrar noticias', --- 38,42 ---- $admin = array ( title => 'Panel de administración', ! welcome => 'Por favor, elige una opción de la siguiente lista:', quotes => 'Administrar frases', news => 'Administrar noticias', |
From: José M. M. <ri...@us...> - 2004-11-16 14:52:41
|
Update of /cvsroot/openbash-org/openbash-org/language In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3972 Modified Files: spanish.php Log Message: Faltaba un acento por sustituir Index: spanish.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/language/spanish.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** spanish.php 16 Nov 2004 10:46:14 -0000 1.14 --- spanish.php 16 Nov 2004 14:52:32 -0000 1.15 *************** *** 37,41 **** $admin = array ( ! title => 'Panel de administración', welcome => 'Por favor, elige una opción de la siguiente lista:', quotes => 'Administrar frases', --- 37,41 ---- $admin = array ( ! title => 'Panel de administración', welcome => 'Por favor, elige una opción de la siguiente lista:', quotes => 'Administrar frases', |
From: Javier B. <jb...@us...> - 2004-11-16 10:46:26
|
Update of /cvsroot/openbash-org/openbash-org/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21741/modules Modified Files: Quote.php Added Files: View.php Log Message: clase view; el este mola maaaaaas --- NEW FILE: View.php --- <?php /* * Display XHTML in a fancy way * We love you HnZeKtO :D */ class view { function ask_quote() { global $add;?> <form id="addquote" action="?page=quote&action=insert" method="post"> <p><textarea id="quote" name="quote" class="textarea" cols="60%" rows="10"></textarea></p> <p><input type="text" id="author" name="author" /><?=$add['author'];?></p> <p><input type="text" id="channel" name="channel" /><?=$add['channel'];?></p> <p><input type="text" id="network" name="network" /><?=$add['network'];?></p> <p> <input type="button" id="preview" value="<?=$add['preview'];?>" /> <input type="submit" id="submit" value="<?=$add['submit'];?>" /> <input type="button" id="reset" value="<?=$add['reset'];?>" /> </p> </form> <p><?=$add['tip'];?></p> <p><?=$add['privacy'];?></p><? } function view_quote($id, $points, $quote, $author, $channel, $network, $ip) { global $quote_language;?> <p class="quote"> <a href="" title="<?=$quote_language['permalink']?>"><b>#<?=$id?></b></a> <a href="rox=312" class="qa">+</a>(<?=$points?>) <a href="sux=312" class="qa">-</a> <a href="rev=312" onClick="return confirm('Flag quote for review?');" class="qa">[X]</a> </p> <p class="qt"><?=$quote?></p><?php } } Index: Quote.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/modules/Quote.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Quote.php 15 Nov 2004 20:26:25 -0000 1.3 --- Quote.php 16 Nov 2004 10:46:14 -0000 1.4 *************** *** 8,29 **** class Quote { - function ask_quote() - { - global $add;?> - <form id="addquote" action="?page=quote&action=insert" method="post"> - <p><textarea id="quote" name="quote" class="textarea" cols="60%" rows="10"></textarea></p> - <p><input type="text" id="author" name="author" /><?=$add['author'];?></p> - <p><input type="text" id="channel" name="channel" /><?=$add['channel'];?></p> - <p><input type="text" id="network" name="network" /><?=$add['network'];?></p> - <p> - <input type="button" id="preview" value="<?=$add['preview'];?>" /> - <input type="submit" id="submit" value="<?=$add['submit'];?>" /> - <input type="button" id="reset" value="<?=$add['reset'];?>" /> - </p> - </form> - <p><?=$add['tip'];?></p> - <p><?=$add['privacy'];?></p><? - } - function insert_quote($quote, $author, $channel, $network, $ip) { --- 8,11 ---- *************** *** 53,73 **** } ! function show_quote($id) { include ("config.php"); $sql = "SELECT points,quote,author,channel,network,ip FROM quote WHERE id='$id' AND quote.purge=0 AND pending=0"; $quote = $bd->_Execute($sql); ! if($quote->RecordCount() == 1) { ?> ! <p class="quote"> ! <a href="" title="Permanent link to this quote."><b>#<?=$id?></b></a> ! <a href="rox=312" class="qa">+</a>(<?=$quote->fields['points']?>) ! <a href="sux=312" class="qa">-</a> ! <a href="rev=312" onClick="return confirm('Flag quote for review?');" class="qa">[X]</a> ! </p> ! <p class="qt"><?=$quote->fields['quote']?></p><?php } else { return (0); } } ! function show_quotes_by_id($order, $start, $end) { include ("config.php"); --- 35,50 ---- } ! function get_quote($id) { include ("config.php"); + $view = new view(); $sql = "SELECT points,quote,author,channel,network,ip FROM quote WHERE id='$id' AND quote.purge=0 AND pending=0"; $quote = $bd->_Execute($sql); ! if($quote->RecordCount() == 1) { ! $view->view_quote($id, $quote->fields['points'], $quote->fields['quote'], $quote->fields['author'], $quote->fields['channel'], $quote->fields['network'], $quote->fields['ip']); } else { return (0); } } ! function get_quotes_by_id($order, $start, $end) { include ("config.php"); *************** *** 75,83 **** $ids = $bd->_Execute($sql); if($ids->RecordCount()) { ! while (!$ids->EOF) { $this->show_quote($ids->fields['id']); $ids->MoveNext(); } } else { return (0); } } ! function show_quotes_by_top($top) { include ("config.php"); --- 52,60 ---- $ids = $bd->_Execute($sql); if($ids->RecordCount()) { ! while (!$ids->EOF) { $this->get_quote($ids->fields['id']); $ids->MoveNext(); } } else { return (0); } } ! function get_quotes_by_top($top) { include ("config.php"); *************** *** 87,91 **** <table cellpadding="2" cellspacing="0" width="80%"> <tr><td><?php ! while (!$ids->EOF) { $this->show_quote($ids->fields['id']); $ids->MoveNext(); } ?> </td></tr> </table><?php --- 64,68 ---- <table cellpadding="2" cellspacing="0" width="80%"> <tr><td><?php ! while (!$ids->EOF) { $this->get_quote($ids->fields['id']); $ids->MoveNext(); } ?> </td></tr> </table><?php |
From: Javier B. <jb...@us...> - 2004-11-16 10:46:26
|
Update of /cvsroot/openbash-org/openbash-org/pages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21741/pages Modified Files: quote.php Log Message: clase view; el este mola maaaaaas Index: quote.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/pages/quote.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** quote.php 15 Nov 2004 20:26:33 -0000 1.2 --- quote.php 16 Nov 2004 10:46:14 -0000 1.3 *************** *** 1,5 **** --- 1,7 ---- <?php include ("config.php"); + include ("modules/View.php"); include ("modules/Quote.php"); + $view = new view(); $quote = new quote(); *************** *** 12,23 **** else { $top = 100; } switch ($_GET['action']) { ! case 'latest': $quote->show_quotes_by_id("DESC", $start, $end); break; case 'browse': break; ! case 'top': $quote->show_quotes_by_top($top); break; ! case 'add': $quote->ask_quote(); break; case 'insert': $ip = get_ipaddr(); ! $quote->insert_quote($_POST['quote'], $_POST['author'], $_POST['channel'], $_POST['network'], $ip); ! break; ! default: $quote->show_quotes_by_random($start, $end); break; //defaults to random } } --- 14,24 ---- else { $top = 100; } switch ($_GET['action']) { ! case 'latest': $quote->get_quotes_by_id("DESC", $start, $end); break; case 'browse': break; ! case 'top': $quote->get_quotes_by_top($top); break; ! case 'add': $view->ask_quote(); break; case 'insert': $ip = get_ipaddr(); ! $quote->insert_quote($_POST['quote'], $_POST['author'], $_POST['channel'], $_POST['network'], $ip); break; ! default: $quote->get_quotes_by_random($start, $end); break; //defaults to random } } |
From: Javier B. <jb...@us...> - 2004-11-16 10:46:25
|
Update of /cvsroot/openbash-org/openbash-org/language In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21741/language Modified Files: english.php spanish.php Log Message: clase view; el este mola maaaaaas Index: spanish.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/language/spanish.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** spanish.php 15 Nov 2004 20:26:25 -0000 1.13 --- spanish.php 16 Nov 2004 10:46:14 -0000 1.14 *************** *** 44,47 **** --- 44,51 ---- ); + $quote_language = array ( + permalink => 'Enlace permanente a esta quote.', + review => '¿Marcar esta quote para revisión?' + ); ?> Index: english.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/language/english.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** english.php 19 Aug 2004 18:06:51 -0000 1.10 --- english.php 16 Nov 2004 10:46:14 -0000 1.11 *************** *** 41,43 **** --- 41,47 ---- ); + $quote_language = array ( + permalink => 'Permanent link to this quote.', + review => 'Flag quote for review?' + ); ?> |
From: Javier B. <jb...@us...> - 2004-11-15 20:27:08
|
Update of /cvsroot/openbash-org/openbash-org/language In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19219/language Modified Files: spanish.php Log Message: mas quote Index: spanish.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/language/spanish.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** spanish.php 19 Aug 2004 18:06:51 -0000 1.12 --- spanish.php 15 Nov 2004 20:26:25 -0000 1.13 *************** *** 30,34 **** .'chistes que no estuvieran en la quote, etc', privacy => '<b>Privacidad: </b>La dirección IP o el correo ' ! .'electrónico nunca se harán públicos' ); --- 30,37 ---- .'chistes que no estuvieran en la quote, etc', privacy => '<b>Privacidad: </b>La dirección IP o el correo ' ! .'electrónico nunca se harán públicos', ! author => 'autor, pon aquí tu email (no se mostrará)', ! channel => 'canal de IRC o sala de Jabber, MSN o lo que sea', ! network => 'server irc, o similar' ); |
From: Javier B. <jb...@us...> - 2004-11-15 20:27:05
|
Update of /cvsroot/openbash-org/openbash-org In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19219 Modified Files: config.php Log Message: mas quote Index: config.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/config.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** config.php 15 Nov 2004 12:09:42 -0000 1.14 --- config.php 15 Nov 2004 20:26:24 -0000 1.15 *************** *** 13,16 **** --- 13,18 ---- $admin_pass = ''; + $moderator_email = 'co...@va...'; # put here the mail address of moderators, + # they will receive an email for every pending quote $summaries = 50; # number of quotes shown on a single page |
From: Javier B. <jb...@us...> - 2004-11-15 20:27:00
|
Update of /cvsroot/openbash-org/openbash-org/pages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19219/pages Modified Files: quote.php Log Message: mas quote Index: quote.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/pages/quote.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** quote.php 15 Nov 2004 12:39:20 -0000 1.1 --- quote.php 15 Nov 2004 20:26:33 -0000 1.2 *************** *** 16,19 **** --- 16,22 ---- case 'top': $quote->show_quotes_by_top($top); break; case 'add': $quote->ask_quote(); break; + case 'insert': $ip = get_ipaddr(); + $quote->insert_quote($_POST['quote'], $_POST['author'], $_POST['channel'], $_POST['network'], $ip); + break; default: $quote->show_quotes_by_random($start, $end); break; //defaults to random } |
From: Javier B. <jb...@us...> - 2004-11-15 20:26:43
|
Update of /cvsroot/openbash-org/openbash-org/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19219/modules Modified Files: Quote.php common.php Log Message: mas quote Index: Quote.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/modules/Quote.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Quote.php 15 Nov 2004 12:39:20 -0000 1.2 --- Quote.php 15 Nov 2004 20:26:25 -0000 1.3 *************** *** 11,16 **** { global $add;?> ! <form id="addquote" action="?page=quote&action=add&insert=1" method="post"> <p><textarea id="quote" name="quote" class="textarea" cols="60%" rows="10"></textarea></p> <p> <input type="button" id="preview" value="<?=$add['preview'];?>" /> --- 11,19 ---- { global $add;?> ! <form id="addquote" action="?page=quote&action=insert" method="post"> <p><textarea id="quote" name="quote" class="textarea" cols="60%" rows="10"></textarea></p> + <p><input type="text" id="author" name="author" /><?=$add['author'];?></p> + <p><input type="text" id="channel" name="channel" /><?=$add['channel'];?></p> + <p><input type="text" id="network" name="network" /><?=$add['network'];?></p> <p> <input type="button" id="preview" value="<?=$add['preview'];?>" /> *************** *** 23,29 **** } ! function insert_quote() { } --- 26,54 ---- } ! function insert_quote($quote, $author, $channel, $network, $ip) { + include ("config.php"); + $quote = nl2br(variable_clean($quote)); + //$author = check_email($author); + $channel = variable_clean($channel); + $network = variable_clean($network); + //$ip = check_ipv4($ip); + $purge = 0; // by default the quote is not purged, of course xD + $pending = 1; // by default quote gets marked as pending until an admin validates it + $sql = "INSERT INTO quote + (`id`,`points`,`quote`,`purge`,`author`,`channel`,`network`,`pending`,`ip`) + VALUES ( + '', + '$points', + '$quote', + '$purge', + '$author', + '$channel', + '$network', + '$pending', + '$ip')"; + $ins = $bd->_Execute($sql); + $this->mail_warning($author, $quote, $ip); } *************** *** 31,35 **** { include ("config.php"); ! $sql = "SELECT points,quote,author,channel,network,ip FROM quote WHERE id='$id'"; $quote = $bd->_Execute($sql); if($quote->RecordCount() == 1) { ?> --- 56,60 ---- { include ("config.php"); ! $sql = "SELECT points,quote,author,channel,network,ip FROM quote WHERE id='$id' AND quote.purge=0 AND pending=0"; $quote = $bd->_Execute($sql); if($quote->RecordCount() == 1) { ?> *************** *** 47,53 **** { include ("config.php"); ! $sql = "SELECT id FROM quote ORDER BY id $order LIMIT $start,$end"; $ids = $bd->_Execute($sql); ! if($ids->RecordCount()) { while (!$ids->EOF) { $this->show_quote($ids->fields['id']); $ids->MoveNext(); } } else { return (0); } --- 72,78 ---- { include ("config.php"); ! $sql = "SELECT id FROM quote WHERE quote.purge=0 AND pending=0 ORDER BY id $order LIMIT $start,$end"; $ids = $bd->_Execute($sql); ! if($ids->RecordCount()) { while (!$ids->EOF) { $this->show_quote($ids->fields['id']); $ids->MoveNext(); } } else { return (0); } *************** *** 57,61 **** { include ("config.php"); ! $sql = "SELECT id FROM quote ORDER BY points LIMIT $top"; $ids = $bd->_Execute($sql); if($ids->RecordCount()) { ?> --- 82,86 ---- { include ("config.php"); ! $sql = "SELECT id FROM quote purge=0 AND pending=0 ORDER BY points LIMIT $top"; $ids = $bd->_Execute($sql); if($ids->RecordCount()) { ?> *************** *** 67,69 **** --- 92,110 ---- } else { return (0); } } + + function mail_warning($author, $quote, $ip) + { + include ("config.php"); + $rcpt = $moderator_email; + $subject = "[ OpenBash ] new quote inserted by $author"; + $body = "The following quote has been inserted and marked as pending until a moderator aproves it: + + $quote + + by: $author ($ip) + + * Please visit the admin page to validate: http://$_SERVER[SERVER_NAME]/?page=admin"; + $from = "From: webmaster@$_SERVER[SERVER_NAME]\nReply-To: $email\nX-Mailer: VLog MSG Alert System"; + mail($rcpt, $subject, $body, $from); + } } Index: common.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/modules/common.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** common.php 15 Nov 2004 12:09:43 -0000 1.2 --- common.php 15 Nov 2004 20:26:28 -0000 1.3 *************** *** 5,9 **** $allowed='<a><br><b><h1><h2>'. '<h3><h4><i><code>' . ! '<li><ol><p><strong>' . '<u><ul><span><pre>'; $tmp = str_replace ('--', '', $var); --- 5,9 ---- $allowed='<a><br><b><h1><h2>'. '<h3><h4><i><code>' . ! '<li><ol><p><strong>'. '<u><ul><span><pre>'; $tmp = str_replace ('--', '', $var); *************** *** 14,101 **** } ! /* ! * arregla una cadena para quitarle ! * caracteres no deseados ! */ ! function corregir_texto($texto) ! { ! $texto = trim ($texto); #quitamos espacios al principio y final de la cadena ! $texto = addslashes ($texto); #añadimos barras invertidas a ', "", etc ! $texto = quotemeta ($texto); #añadimos barras invertidas a ·, \\, [, $, etc ! $texto = strip_tags ($texto); #quita marcas PHP o HTML de una cadena ! return ($texto); ! } ! ! /* ! * parsear un numero ! */ ! function corregir_num($num) ! { ! $num = (int)$num; ! return ($num); ! } ! ! /* ! * validar un nick ! * que sea a-zA-Z_ y numeros solo ! * por ejemplo: ender3 o ender_ ! */ ! ! function valida_nick ($nick) ! { ! # if (!ereg("^[a-zA-Z_]+[a-zA-Z0-9_]*$", $nick)) { ! if (!ereg("^_*-*\^?\[*[A-Za-z][0-9A-Za-z]*[0-9A-Za-z]*_*-*\^*", $nick)) { ! ! /* ! * FIXME: Un nick puede contener ^, -, ', y casi cualquier cosa. ! */ ! ! echo "Un nick solo puede contener caracteres validos del abecedario, numeros, o guion bajo '_', por ejemplo: pepe22_"; ! return (0); ! } else { ! $nick = addslashes ($nick); ! return ($nick); ! } ! } ! ! /* ! * validar un nombre: a-z,ñ,acentos,., etc ! */ ! ! function valida_nombre ($nombre) ! { ! if (!ereg("^[a-zA-ZñÑ0-9]+[a-zA-ZñÑ0-9. ]*$", $nombre)) { ! echo "Un nombre o apellido solo puede contener caracteres de la A a la Z, incluyendo ñ, acentos, espacio en blanco y el punto."; ! return (0); ! } ! return (1); ! } ! ! /* ! * validar una frase: ! * a-z,ñ,acentos,comas,puntos,etc ! */ ! ! function valida_frase($frase) { ! /* ! * FIXME: La frase debería tener cualquier símbolo. Concretamente <> suelen delimitar el nick ! */ ! ! if (!ereg("^[a-zA-ZñÑ0-9]+[a-zA-ZñÑ0-9\,\.\;- ]*$", $frase)) { ! echo "No puede introducir simbolos como <,>,*, o cualquier tipo de comillas, simples o dobles."; ! return (0); ! } ! return (1); } /* ! * validar URL */ ! function valida_url($url) { if (!ereg("^http://w{0,3}\.?[0-9A-Za-z]+\.?[0-9A-Za-z]+\.[0-9A-Za-z]{3}/?.*", $url)) { ! echo "La página web introducida no es correcta, corríjala"; return (0); } --- 14,31 ---- } ! function get_ipaddr() { ! if (!empty($_SERVER['REMOTE_ADDR'])) { return ($_SERVER['REMOTE_ADDR']); } ! else { return ($_SERVER['HTTP_X_FORWARDED_FOR']); } } /* ! * validate URL */ ! function check_url($url) { if (!ereg("^http://w{0,3}\.?[0-9A-Za-z]+\.?[0-9A-Za-z]+\.[0-9A-Za-z]{3}/?.*", $url)) { ! echo "La página web introducida no es correcta, corríjala"; return (0); } *************** *** 104,111 **** /* ! * comprobar IPv4 */ ! function valida_ipv4($ip) { if (eregi("^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$", $ip)) { --- 34,41 ---- /* ! * validate IPv4 */ ! function check_ipv4($ip) { if (eregi("^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$", $ip)) { *************** *** 129,136 **** /* ! * validar email */ ! function valida_email($email_raw) { $email_nr = eregi_replace("\n", "", $email_raw); --- 59,66 ---- /* ! * validate email address */ ! function check_email($email_raw) { $email_nr = eregi_replace("\n", "", $email_raw); *************** *** 151,172 **** } return (1); ! } else ! return (1); } } - - /* - * generar codigo de seguridad - * por el SPAM WEB - */ - function spamcode($length) { for ($i = 1; $i <= $length; $i++) { ! if ($i == 1) ! $randnum = rand(0, 9); ! else ! $randnum .= rand(0, 9); } return ($randnum); --- 81,94 ---- } return (1); ! } else { return (1); } } } function spamcode($length) { for ($i = 1; $i <= $length; $i++) { ! if ($i == 1) { ! $randnum = rand(0, 9); ! } else { $randnum .= rand(0, 9); } } return ($randnum); *************** *** 181,183 **** } ?> - --- 103,104 ---- |
From: Javier B. <jb...@us...> - 2004-11-15 12:39:30
|
Update of /cvsroot/openbash-org/openbash-org/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17653/modules Modified Files: Quote.php Log Message: subida version inicial de pages/quote.php Index: Quote.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/modules/Quote.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Quote.php 15 Nov 2004 12:09:43 -0000 1.1 --- Quote.php 15 Nov 2004 12:39:20 -0000 1.2 *************** *** 11,15 **** { global $add;?> ! <form id="addquote" action="" method="post"> <p><textarea id="quote" name="quote" class="textarea" cols="60%" rows="10"></textarea></p> <p> --- 11,15 ---- { global $add;?> ! <form id="addquote" action="?page=quote&action=add&insert=1" method="post"> <p><textarea id="quote" name="quote" class="textarea" cols="60%" rows="10"></textarea></p> <p> *************** *** 23,30 **** } - function validate_quote($quote) - { - } - function insert_quote() { --- 23,26 ---- *************** *** 40,46 **** <p class="quote"> <a href="" title="Permanent link to this quote."><b>#<?=$id?></b></a> ! <a href="./?le=bbb35129920419b934023f4eb0de854b&rox=312" class="qa">+</a>(<?=$quote->fields['points']?>) ! <a href="./?le=bbb35129920419b934023f4eb0de854b&sox=312" class="qa">-</a> ! <a href="./?le=bbb35129920419b934023f4eb0de854b&sux=312" onClick="return confirm('Flag quote for review?');" class="qa">[X]</a> </p> <p class="qt"><?=$quote->fields['quote']?></p><?php --- 36,42 ---- <p class="quote"> <a href="" title="Permanent link to this quote."><b>#<?=$id?></b></a> ! <a href="rox=312" class="qa">+</a>(<?=$quote->fields['points']?>) ! <a href="sux=312" class="qa">-</a> ! <a href="rev=312" onClick="return confirm('Flag quote for review?');" class="qa">[X]</a> </p> <p class="qt"><?=$quote->fields['quote']?></p><?php |
From: Javier B. <jb...@us...> - 2004-11-15 12:39:30
|
Update of /cvsroot/openbash-org/openbash-org/pages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17653/pages Added Files: quote.php Log Message: subida version inicial de pages/quote.php --- NEW FILE: quote.php --- <?php include ("config.php"); include ("modules/Quote.php"); $quote = new quote(); if (isset($_GET['action'])) { if (isset($_GET['start'])) { $start = variable_clean($_GET['start']); } else { $start = 0; } if (isset($_GET['end'])) { $end = variable_clean($_GET['end']); } else { $end = $summaries; } if (isset($_GET['top'])) { $top = variable_clean($_GET['top']); } else { $top = 100; } switch ($_GET['action']) { case 'latest': $quote->show_quotes_by_id("DESC", $start, $end); break; case 'browse': break; case 'top': $quote->show_quotes_by_top($top); break; case 'add': $quote->ask_quote(); break; default: $quote->show_quotes_by_random($start, $end); break; //defaults to random } } |