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: José M. M. <ri...@us...> - 2004-11-20 09:51:34
|
Update of /cvsroot/openbash-org/openbash-org/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23383/modules Modified Files: View.php Log Message: class="quote" se usa sólo para las quotes, el resto va con fuente normal. Index: View.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/modules/View.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** View.php 20 Nov 2004 09:38:22 -0000 1.9 --- View.php 20 Nov 2004 09:51:24 -0000 1.10 *************** *** 49,53 **** { global $quote_language;?> ! <p class="quote"><?=$quote_language['pending']?></p> <?php } --- 49,53 ---- { global $quote_language;?> ! <p><?=$quote_language['pending']?></p> <?php } *************** *** 56,60 **** { global $quote_language;?> ! <p class="quote"><?=$quote_language['non_existent']?></p> <?php } --- 56,60 ---- { global $quote_language;?> ! <p><?=$quote_language['non_existent']?></p> <?php } *************** *** 63,67 **** { global $quote_language;?> ! <p class="quote"><?=$quote_language['inserted']?></p> <?php $this->view_redirect($url); } --- 63,67 ---- { global $quote_language;?> ! <p><?=$quote_language['inserted']?></p> <?php $this->view_redirect($url); } *************** *** 70,74 **** { global $quote_language;?> ! <p class="quote"><?=$quote_language['non_inserted']?></p> <?php } --- 70,74 ---- { global $quote_language;?> ! <p><?=$quote_language['non_inserted']?></p> <?php } *************** *** 77,82 **** { global $quote_language;?> ! <p class="quote"><?=$quote_language['updated']?></p> ! <p class="quote"><a href="javascript:;" onClick="history.back();"><?=$quote_language['back']?></a></p> <?php } --- 77,82 ---- { global $quote_language;?> ! <p><?=$quote_language['updated']?></p> ! <p><a href="javascript:;" onClick="history.back();"><?=$quote_language['back']?></a></p> <?php } |
From: José M. M. <ri...@us...> - 2004-11-20 09:38:32
|
Update of /cvsroot/openbash-org/openbash-org/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21245/modules Modified Files: View.php Log Message: Añadidas labels al formulario de añadir quotes Index: View.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/modules/View.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** View.php 19 Nov 2004 10:15:38 -0000 1.8 --- View.php 20 Nov 2004 09:38:22 -0000 1.9 *************** *** 16,23 **** 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'];?>" /> --- 16,24 ---- global $add;?> <form id="addquote" action="?page=quote&action=insert" method="post"> ! <div><label for="quote"><?=$add['please_insert']?></label></div> ! <div><textarea id="quote" name="quote" class="textarea" cols="60%" rows="10"></textarea></div> ! <p><input type="text" id="author" name="author" /> <label for="author"><?=$add['author'];?></label></p> ! <p><input type="text" id="channel" name="channel" /> <label for="channel"><?=$add['channel'];?></label></p> ! <p><input type="text" id="network" name="network" /> <label for="network"><?=$add['network'];?></label></p> <p> <input type="button" id="preview" value="<?=$add['preview'];?>" /> |
From: José M. M. <ri...@us...> - 2004-11-20 09:38:31
|
Update of /cvsroot/openbash-org/openbash-org/language In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21245/language Modified Files: english.php spanish.php Log Message: Añadidas labels al formulario de añadir quotes Index: spanish.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/language/spanish.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** spanish.php 19 Nov 2004 10:15:38 -0000 1.22 --- spanish.php 20 Nov 2004 09:38:22 -0000 1.23 *************** *** 21,24 **** --- 21,25 ---- $add = array ( + please_insert => 'Por favor, pega aquí tu quote', preview => 'Previsualizar', submit => 'Enviar', Index: english.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/language/english.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** english.php 19 Nov 2004 10:15:38 -0000 1.12 --- english.php 20 Nov 2004 09:38:22 -0000 1.13 *************** *** 20,23 **** --- 20,24 ---- $add = array ( + please_insert => 'Please paste your quote here', preview => 'preview', submit => 'submit', |
From: Javier B. <jb...@us...> - 2004-11-19 10:16:12
|
Update of /cvsroot/openbash-org/openbash-org/pages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15651/pages Added Files: admin_header.php Log Message: añadido pages/admin_header.php para poder seleccionar las opciones comodamente --- NEW FILE: admin_header.php --- <?php /* vim: set sts=2 ts=8 sw=2 noexpandtab: */ ?> <p align="right"> <a href="?page=admin&a_opt=quotes"><?=$admin['quotes']?></a> / <a href="?page=admin&a_opt=news"><?=$admin['news']?></a> / <a href="?page=admin&a_opt=users"><?=$admin['users']?></a> / <a href="?page=admin&a_opt=close"><?=$admin['close']?></a> </p> |
From: Javier B. <jb...@us...> - 2004-11-19 10:15:49
|
Update of /cvsroot/openbash-org/openbash-org/language In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15498/language Modified Files: english.php spanish.php Log Message: añadido pages/admin_header.php para poder seleccionar las opciones comodamente Index: spanish.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/language/spanish.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** spanish.php 18 Nov 2004 17:41:58 -0000 1.21 --- spanish.php 19 Nov 2004 10:15:38 -0000 1.22 *************** *** 65,67 **** --- 65,68 ---- submit => 'Login' ); + ?> Index: english.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/language/english.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** english.php 16 Nov 2004 10:46:14 -0000 1.11 --- english.php 19 Nov 2004 10:15:38 -0000 1.12 *************** *** 2,20 **** $sentences = array ( ! index => 'Index', ! latest => 'Latest', ! random => 'Random', ! browse => 'Browse', ! add => 'Add', ! search => 'Search', ! approved => 'Approved quotes', ! pending => 'Pending quotes', ! time => 'Process time' ); $index = array ( ! title => 'OpenBash.org', welcome_message => 'Hi. Welcome to OpenBash.org', ! news => 'News' ); --- 2,20 ---- $sentences = array ( ! index => 'Index', ! latest => 'Latest', ! random => 'Random', ! browse => 'Browse', ! add => 'Add', ! search => 'Search', ! approved => 'Approved quotes', ! pending => 'Pending quotes', ! time => 'Process time' ); $index = array ( ! title => 'OpenBash.org', welcome_message => 'Hi. Welcome to OpenBash.org', ! news => 'News' ); *************** *** 24,34 **** reset => 'reset', tip => 'You may submit quotes from any chat medium, so long as ' ! .'they have reasonable formatting (IRC, AIM, ICQ, Yahoo, ' ! .'NOT MSN or MS Chat).<br /><br />' ! .'Tips for approval: no timestamps, keep it short (trim ' ! .'useless parts), remove trailing laughs, and avoid ' ! .'inside jokes.', privacy => '<b>Privacy: </b>Your IP address or email will never be ' ! .'publicly available' ); --- 24,34 ---- reset => 'reset', tip => 'You may submit quotes from any chat medium, so long as ' ! .'they have a reasonable formatting (IRC, AIM, ICQ, Yahoo, ' ! .'NOT MSN or MS Chat).<br /><br />' ! .'Tips for approval: no timestamps, keep it short (trim ' ! .'useless parts), remove trailing laughs and avoid ' ! .'inside jokes.', privacy => '<b>Privacy: </b>Your IP address or email will never be ' ! .'publicly available' ); *************** *** 42,47 **** $quote_language = array ( ! permalink => 'Permanent link to this quote.', ! review => 'Flag quote for review?' ); ?> --- 42,64 ---- $quote_language = array ( ! permalink => 'Permanent link to this quote.', ! review => 'Flag quote for review?' ! inserted => 'The quote has been saved and marked as pending. Moderators have been emailed<br/><br>/'. ! 'and the will check your text as soon as possible, thank you for participating.<br/><br/>'. ! 'In the next page you will be able to check the quote status to see if it has been aproved or not', ! non_inserted => 'This quote has not yet been inserted in our database.', ! pending => 'This quote is still marked as pending, check again later please.', ! non_existent => 'The quote you are looking for does not exist on our database.', ! updated => 'Your vote has been accepted, thanks :D', ! back => 'Back' ); + + $login_language = array ( + title => 'VALIDATION', + msg => 'Please login before continue.', + login => 'User', + passwd => 'Password', + submit => 'Login' + ); + ?> |
From: Javier B. <jb...@us...> - 2004-11-19 10:15:49
|
Update of /cvsroot/openbash-org/openbash-org/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15498/modules Modified Files: View.php Log Message: añadido pages/admin_header.php para poder seleccionar las opciones comodamente Index: View.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/modules/View.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** View.php 18 Nov 2004 17:42:04 -0000 1.7 --- View.php 19 Nov 2004 10:15:38 -0000 1.8 *************** *** 95,110 **** global $login_language; ?> ! <h5 align="center"><?php echo $login_language['title'];?></h5> <hr> ! <p><?=$login_language['msg'];?></p> <form action="?page=admin" method="post"> <input type="hidden" name="form" value="1"> <table border="0" width="50%"> <tr class="textoficha"> ! <td><?php echo $login_language['login'];?></td> <td><input type="text" name="login" class="textfield" maxlength="20"></td> ! <td><?php echo $login_language['passwd'];?></td> <td><input type="password" name="passwd" class="textfield" maxlength="20"><td> ! <td><input type="submit" name="submit" class="submit" value="<?php echo $login_language['submit'];?>"></td> </tr> </table> --- 95,110 ---- global $login_language; ?> ! <h5 align="center"><?=$login_language['title']?></h5> <hr> ! <p><?=$login_language['msg']?></p> <form action="?page=admin" method="post"> <input type="hidden" name="form" value="1"> <table border="0" width="50%"> <tr class="textoficha"> ! <td><?=$login_language['login']?></td> <td><input type="text" name="login" class="textfield" maxlength="20"></td> ! <td><?=$login_language['passwd']?></td> <td><input type="password" name="passwd" class="textfield" maxlength="20"><td> ! <td><input type="submit" name="submit" class="submit" value="<?=$login_language['submit']?>"></td> </tr> </table> |
From: Javier B. <jb...@us...> - 2004-11-19 10:15:48
|
Update of /cvsroot/openbash-org/openbash-org/pages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15498/pages Modified Files: admin.php Log Message: añadido pages/admin_header.php para poder seleccionar las opciones comodamente Index: admin.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/pages/admin.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** admin.php 17 Nov 2004 17:59:16 -0000 1.4 --- admin.php 19 Nov 2004 10:15:39 -0000 1.5 *************** *** 21,25 **** } ! include('pages/admin_'.$admin_page.'.php'); ?> --- 21,26 ---- } ! include ("pages/admin_header.php"); ! include ('pages/admin_'.$admin_page.'.php'); ?> |
From: Javier B. <jb...@us...> - 2004-11-18 17:42:13
|
Update of /cvsroot/openbash-org/openbash-org/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26287/modules Modified Files: Quote.php View.php Log Message: metido un history.back() y mensaje cuando se puntua Index: View.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/modules/View.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** View.php 18 Nov 2004 12:46:19 -0000 1.6 --- View.php 18 Nov 2004 17:42:04 -0000 1.7 *************** *** 73,76 **** --- 73,84 ---- } + function view_updated_quote() + { + global $quote_language;?> + <p class="quote"><?=$quote_language['updated']?></p> + <p class="quote"><a href="javascript:;" onClick="history.back();"><?=$quote_language['back']?></a></p> + <?php + } + function view_redirect($url) { ?> Index: Quote.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/modules/Quote.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Quote.php 18 Nov 2004 17:21:32 -0000 1.13 --- Quote.php 18 Nov 2004 17:42:04 -0000 1.14 *************** *** 149,153 **** case 'rev': $this->mail_revision_quote($score_id); break; } ! if (isset($sql2)) { $bd->_Execute($sql2); } } } --- 149,157 ---- case 'rev': $this->mail_revision_quote($score_id); break; } ! if (isset($sql2)) { ! $view = new view(); ! $bd->_Execute($sql2); ! $view->view_updated_quote(); ! } } } |
From: Javier B. <jb...@us...> - 2004-11-18 17:42:12
|
Update of /cvsroot/openbash-org/openbash-org/language In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26287/language Modified Files: spanish.php Log Message: metido un history.back() y mensaje cuando se puntua Index: spanish.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/language/spanish.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** spanish.php 17 Nov 2004 17:59:15 -0000 1.20 --- spanish.php 18 Nov 2004 17:41:58 -0000 1.21 *************** *** 53,57 **** 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.' ); --- 53,59 ---- 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.', ! updated => 'La puntuación ha sido tenida en cuenta', ! back => 'Volver' ); |
From: Javier B. <jb...@us...> - 2004-11-18 17:21:44
|
Update of /cvsroot/openbash-org/openbash-org/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22109/modules Modified Files: Quote.php Log Message: añadido campo voter en quote para almacenar la ip del ultimo votante y evitar tramposos ; corregido un bug de una consulta en el metodo set_quote_score Index: Quote.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/modules/Quote.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Quote.php 18 Nov 2004 16:35:51 -0000 1.12 --- Quote.php 18 Nov 2004 17:21:32 -0000 1.13 *************** *** 141,150 **** */ ! $sql = "SELECT voter FROM quotes WHERE id='$score_id'"; $voter = $bd->_Execute($sql); if (strcmp($ip, $voter->fields['voter'])) { switch ($score_action) { ! case 'rox': $sql2 = "UPDATE quotes SET points=points+1,voter='$ip' WHERE id='$score_id'"; break; ! case 'sux': $sql2 = "UPDATE quotes SET points=points-1,voter='$ip' WHERE id='$score_id'"; break; case 'rev': $this->mail_revision_quote($score_id); break; } --- 141,150 ---- */ ! $sql = "SELECT voter FROM quote WHERE id='$score_id'"; $voter = $bd->_Execute($sql); if (strcmp($ip, $voter->fields['voter'])) { switch ($score_action) { ! case 'rox': $sql2 = "UPDATE quote SET points=points+1,voter='$ip' WHERE id='$score_id'"; break; ! case 'sux': $sql2 = "UPDATE quote SET points=points-1,voter='$ip' WHERE id='$score_id'"; break; case 'rev': $this->mail_revision_quote($score_id); break; } *************** *** 156,167 **** { include ("config.php"); ! $sql = "SELECT quote FROM quotes WHERE id='$id'"; $quote = $bd->_Execute($sql); if ($quote->RecordCount()) { $rcpt = $moderator_email; $subject = "[ OpenBash ] quote $id may need a revision"; $body = "This quote: ! $quote Seems to need a revision. Please go to control panel and check it"; --- 156,168 ---- { include ("config.php"); ! $sql = "SELECT quote FROM quote WHERE id='$id'"; $quote = $bd->_Execute($sql); if ($quote->RecordCount()) { + $q = $quote->fields['quote']; $rcpt = $moderator_email; $subject = "[ OpenBash ] quote $id may need a revision"; $body = "This quote: ! $q Seems to need a revision. Please go to control panel and check it"; |
From: Javier B. <jb...@us...> - 2004-11-18 17:21:43
|
Update of /cvsroot/openbash-org/openbash-org In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22109 Modified Files: openbash-org.mysql Log Message: añadido campo voter en quote para almacenar la ip del ultimo votante y evitar tramposos ; corregido un bug de una consulta en el metodo set_quote_score Index: openbash-org.mysql =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/openbash-org.mysql,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** openbash-org.mysql 16 Nov 2004 16:27:06 -0000 1.10 --- openbash-org.mysql 18 Nov 2004 17:21:31 -0000 1.11 *************** *** 13,16 **** --- 13,17 ---- `pending` BOOL DEFAULT 1 NOT NULL , `ip` VARCHAR ( 16 ) NOT NULL , + `voter` VARCHAR ( 16 ) , PRIMARY KEY ( `id` ) ) TYPE = InnoDB; |
From: Javier B. <jb...@us...> - 2004-11-18 16:36:06
|
Update of /cvsroot/openbash-org/openbash-org/pages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11610/pages Modified Files: quote.php Log Message: tema de puntuaciones, renombrado de alguna funcion et al Index: quote.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/pages/quote.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** quote.php 18 Nov 2004 13:02:31 -0000 1.8 --- quote.php 18 Nov 2004 16:35:51 -0000 1.9 *************** *** 30,47 **** $quote->insert_quote($_POST['quote'], $_POST['author'], $_POST['channel'], $_POST['network'], $ip); break; case 'single': $quote->get_quote($_GET['quote']); break; ! case 'score' : ! if (isset($_GET['rox'])) { ! $score_id = $_GET['rox']; ! $score_action = 'rox'; ! } else if (isset($_GET['sux'])) { ! $score_id = $_GET['sux']; ! $score_action = 'sux'; ! } else if (isset($_GET['rev'])) { ! $score_id = $_GET['rev']; ! $score_action = 'rev'; ! } else break; ! $quote->set_score($score_id, $score_action);break; ! case 'random1':$quote->get_quotes_by_random(1);break; default: $quote->get_quotes_by_random(0); break; //defaults to random quotes } --- 30,54 ---- $quote->insert_quote($_POST['quote'], $_POST['author'], $_POST['channel'], $_POST['network'], $ip); break; case 'single': $quote->get_quote($_GET['quote']); break; ! case 'score' : ! /* ! * check _GET and apply ! * the correct values to ! * update quote's punctuation ! */ ! ! if (isset($_GET['rox'])) { ! $score_id = $_GET['rox']; ! $score_action = 'rox'; ! } else if (isset($_GET['sux'])) { ! $score_id = $_GET['sux']; ! $score_action = 'sux'; ! } else if (isset($_GET['rev'])) { ! $score_id = $_GET['rev']; ! $score_action = 'rev'; ! } else break; ! ! $quote->set_quote_score($score_id, $score_action); break; ! case 'random1':$quote->get_quotes_by_random(1); break; default: $quote->get_quotes_by_random(0); break; //defaults to random quotes } |
From: Javier B. <jb...@us...> - 2004-11-18 16:36:04
|
Update of /cvsroot/openbash-org/openbash-org/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11610/modules Modified Files: Quote.php Log Message: tema de puntuaciones, renombrado de alguna funcion et al Index: Quote.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/modules/Quote.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Quote.php 18 Nov 2004 12:27:09 -0000 1.11 --- Quote.php 18 Nov 2004 16:35:51 -0000 1.12 *************** *** 37,41 **** $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); --- 37,41 ---- $view->view_non_inserted_quote(); } else { ! $this->mail_pending_quote($author, $quote, $ip); $url = '?page=quote&action=single&quote='.$bd->Insert_ID(); $view->view_inserted_quote($url); *************** *** 132,136 **** } ! function mail_warning($author, $quote, $ip) { include ("config.php"); --- 132,176 ---- } ! function set_quote_score($score_id, $score_action) ! { ! include ("config.php"); ! $ip = get_ipaddr(); ! ! /* ! * check last vote ! */ ! ! $sql = "SELECT voter FROM quotes WHERE id='$score_id'"; ! $voter = $bd->_Execute($sql); ! if (strcmp($ip, $voter->fields['voter'])) { ! switch ($score_action) { ! case 'rox': $sql2 = "UPDATE quotes SET points=points+1,voter='$ip' WHERE id='$score_id'"; break; ! case 'sux': $sql2 = "UPDATE quotes SET points=points-1,voter='$ip' WHERE id='$score_id'"; break; ! case 'rev': $this->mail_revision_quote($score_id); break; ! } ! if (isset($sql2)) { $bd->_Execute($sql2); } ! } ! } ! ! function mail_revision_quote($id) ! { ! include ("config.php"); ! $sql = "SELECT quote FROM quotes WHERE id='$id'"; ! $quote = $bd->_Execute($sql); ! if ($quote->RecordCount()) { ! $rcpt = $moderator_email; ! $subject = "[ OpenBash ] quote $id may need a revision"; ! $body = "This quote: ! ! $quote ! ! Seems to need a revision. Please go to control panel and check it"; ! ! $from = "From: webmaster@$_SERVER[SERVER_NAME]\nReply-To: $author\nX-Mailer: OpenBash MSG Alert System"; ! mail($rcpt, $subject, $body, $from); ! } ! } ! ! function mail_pending_quote($author, $quote, $ip) { include ("config.php"); |
From: José M. M. <ri...@us...> - 2004-11-18 13:02:53
|
Update of /cvsroot/openbash-org/openbash-org/pages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27287/pages Modified Files: quote.php Log Message: Si no me jamo el break del final mejor Index: quote.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/pages/quote.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** quote.php 18 Nov 2004 12:54:59 -0000 1.7 --- quote.php 18 Nov 2004 13:02:31 -0000 1.8 *************** *** 41,45 **** $score_action = 'rev'; } else break; ! $quote->set_score($score_id, $score_action); case 'random1':$quote->get_quotes_by_random(1);break; --- 41,45 ---- $score_action = 'rev'; } else break; ! $quote->set_score($score_id, $score_action);break; case 'random1':$quote->get_quotes_by_random(1);break; |
From: José M. M. <ri...@us...> - 2004-11-18 12:55:09
|
Update of /cvsroot/openbash-org/openbash-org/pages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25692/pages Modified Files: quote.php Log Message: Añadidos los enlaces a las acciones para las puntuaciones Index: quote.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/pages/quote.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** quote.php 18 Nov 2004 12:35:33 -0000 1.6 --- quote.php 18 Nov 2004 12:54:59 -0000 1.7 *************** *** 30,33 **** --- 30,46 ---- $quote->insert_quote($_POST['quote'], $_POST['author'], $_POST['channel'], $_POST['network'], $ip); break; case 'single': $quote->get_quote($_GET['quote']); break; + case 'score' : + if (isset($_GET['rox'])) { + $score_id = $_GET['rox']; + $score_action = 'rox'; + } else if (isset($_GET['sux'])) { + $score_id = $_GET['sux']; + $score_action = 'sux'; + } else if (isset($_GET['rev'])) { + $score_id = $_GET['rev']; + $score_action = 'rev'; + } else break; + $quote->set_score($score_id, $score_action); + case 'random1':$quote->get_quotes_by_random(1);break; default: $quote->get_quotes_by_random(0); break; //defaults to random quotes |
From: José M. M. <ri...@us...> - 2004-11-18 12:46:31
|
Update of /cvsroot/openbash-org/openbash-org/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23835 Modified Files: View.php Log Message: Puestos enlaces para cambiar la puntuación de las Quotes Index: View.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/modules/View.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** View.php 17 Nov 2004 11:43:32 -0000 1.5 --- View.php 18 Nov 2004 12:46:19 -0000 1.6 *************** *** 35,41 **** <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> ! <a href="rev=312" onClick="return confirm('Flag quote for review?');" class="qa">[X]</a> </p> <p class="qt"><?=$quote?></p><?php --- 35,44 ---- <p class="quote"> <a href="?page=quote&action=single&quote=<?=$id?>" title="<?=$quote_language['permalink']?>"><b>#<?=$id?></b></a> ! <a href="?page=quote&action=score&rox=<?=$id?>" class="qa">+</a> (<?=$points?>) ! <a href="?page=quote&action=score&sux=<?=$id?>" class="qa">-</a> ! <a href="?page=quote&action=score&rev=<?=$id?>" class="qa">[X]</a> ! <!-- ¿Queremos JavaScript? ! <a href="?page=quote&action=score&rev=<?=$id?>" onClick="return confirm('Flag quote for review?');" class="qa">[X]</a> ! --> </p> <p class="qt"><?=$quote?></p><?php |
From: Javier B. <jb...@us...> - 2004-11-18 12:35:43
|
Update of /cvsroot/openbash-org/openbash-org/pages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21296/pages Modified Files: quote.php Log Message: minibug estupido en quote.php por no mirar bien Index: quote.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/pages/quote.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** quote.php 18 Nov 2004 12:27:10 -0000 1.5 --- quote.php 18 Nov 2004 12:35:33 -0000 1.6 *************** *** 31,35 **** case 'single': $quote->get_quote($_GET['quote']); break; case 'random1':$quote->get_quotes_by_random(1);break; ! default: $quote->get_quotes_by_random(); break; //defaults to random quotes } } --- 31,35 ---- case 'single': $quote->get_quote($_GET['quote']); break; case 'random1':$quote->get_quotes_by_random(1);break; ! default: $quote->get_quotes_by_random(0); break; //defaults to random quotes } } |
From: Javier B. <jb...@us...> - 2004-11-18 12:27:23
|
Update of /cvsroot/openbash-org/openbash-org/pages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19217/pages Modified Files: footer.php header.php quote.php Log Message: random1, footer cambiado, etc Index: header.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/pages/header.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** header.php 17 Nov 2004 17:59:21 -0000 1.13 --- header.php 18 Nov 2004 12:27:10 -0000 1.14 *************** *** 33,37 **** / <a href="?page=browse"><?=$sentences['browse']?></a> / <a href="?page=quote&action=random"><?=$sentences['random']?></a> ! <a href="?page=random1&action=random1">>0</a> / <a href="?page=quote&action=top&top=100">Top 100</a> <a href="?page=quote&action=top&top=200">-200</a> --- 33,37 ---- / <a href="?page=browse"><?=$sentences['browse']?></a> / <a href="?page=quote&action=random"><?=$sentences['random']?></a> ! <a href="?page=quote&action=random1">>0</a> / <a href="?page=quote&action=top&top=100">Top 100</a> <a href="?page=quote&action=top&top=200">-200</a> Index: footer.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/pages/footer.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** footer.php 17 Nov 2004 10:46:48 -0000 1.11 --- footer.php 18 Nov 2004 12:27:10 -0000 1.12 *************** *** 2,11 **** <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> --- 2,9 ---- <div id="footer"> <? ! include_once("modules/Quote.php"); ! $quotes = new quote(); ?> ! <?=$sentences['approved']?>: <?=$quotes->get_aproved_quotes();?> | <?=$sentences['pending']?>: <?=$quotes->get_pending_quotes();?> </div> Index: quote.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/pages/quote.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** quote.php 16 Nov 2004 17:23:41 -0000 1.4 --- quote.php 18 Nov 2004 12:27:10 -0000 1.5 *************** *** 7,10 **** --- 7,14 ---- if (isset($_GET['action'])) { + /* + * check _GET args + */ + if (isset($_GET['start'])) { $start = variable_clean($_GET['start']); } else { $start = 0; } *************** *** 13,16 **** --- 17,25 ---- if (isset($_GET['top'])) { $top = variable_clean($_GET['top']); } else { $top = 100; } + + /* + * do stuff + */ + switch ($_GET['action']) { case 'latest': $quote->get_quotes_by_id("DESC", $start, $end); break; *************** *** 21,25 **** $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 } } --- 30,36 ---- $quote->insert_quote($_POST['quote'], $_POST['author'], $_POST['channel'], $_POST['network'], $ip); break; case 'single': $quote->get_quote($_GET['quote']); break; ! case 'random1':$quote->get_quotes_by_random(1);break; ! default: $quote->get_quotes_by_random(); break; //defaults to random quotes } } + ?> |
From: Javier B. <jb...@us...> - 2004-11-18 12:27:23
|
Update of /cvsroot/openbash-org/openbash-org/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19217/modules Modified Files: Quote.php Log Message: random1, footer cambiado, etc Index: Quote.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/modules/Quote.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Quote.php 17 Nov 2004 11:43:32 -0000 1.10 --- Quote.php 18 Nov 2004 12:27:09 -0000 1.11 *************** *** 41,44 **** --- 41,45 ---- $view->view_inserted_quote($url); } + $ins->Close(); } *************** *** 55,58 **** --- 56,60 ---- } } else { $view->view_non_existent_quote(); } + $quote->Close(); } *************** *** 63,68 **** $ids = $bd->_Execute($sql); if($ids->RecordCount()) { ! while (!$ids->EOF) { $this->get_quote($ids->fields['id']); $ids->MoveNext(); } ! } else { return (0); } } --- 65,77 ---- $ids = $bd->_Execute($sql); if($ids->RecordCount()) { ! while (!$ids->EOF) { ! $this->get_quote($ids->fields['id']); ! $ids->MoveNext(); ! } ! $ids->Close(); ! } else { ! $ids->Close(); ! return (0); ! } } *************** *** 73,83 **** $ids = $bd->_Execute($sql); if($ids->RecordCount()) { ! while (!$ids->EOF) { ! $this->get_quote($ids->fields['id']); ! $ids->MoveNext(); ! } ! } else { return (0); } } function mail_warning($author, $quote, $ip) { --- 82,135 ---- $ids = $bd->_Execute($sql); if($ids->RecordCount()) { ! while (!$ids->EOF) { ! $this->get_quote($ids->fields['id']); ! $ids->MoveNext(); ! } ! $ids->Close(); ! } else { ! $ids->Close(); ! return (0); ! } } + function get_quotes_by_random($points) + { + include ("config.php"); + switch ($points) + { + case 1 : $sql ="SELECT id FROM quote WHERE points > 1 AND deleted=0 AND pending=0 ORDER BY RAND()"; break; + default: $sql ="SELECT id FROM quote WHERE deleted=0 AND pending=0 ORDER BY RAND()"; break; + } + $ids = $bd->_Execute($sql); + if($ids->RecordCount()) { + while (!$ids->EOF) { + $this->get_quote($ids->fields['id']); + $ids->MoveNext(); + } + $ids->Close(); + } else { + $ids->Close(); + return (0); + } + } + + function get_aproved_quotes() + { + include ("config.php"); + $sql = "SELECT COUNT(*) AS aproved FROM quote WHERE pending=0"; + $aproved = $bd->_Execute($sql); + if($aproved->RecordCount()) { return ($aproved->fields['aproved']); } + else { return (0); } + } + + function get_pending_quotes() + { + include ("config.php"); + $sql = "SELECT COUNT(*) AS pending FROM quote WHERE pending=1"; + $pending = $bd->_Execute($sql); + if($pending->RecordCount()) { return ($pending->fields['pending']); } + else { return (0); } + } + function mail_warning($author, $quote, $ip) { |
From: Javier B. <jb...@us...> - 2004-11-17 18:00:30
|
Update of /cvsroot/openbash-org/openbash-org/pages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12107/pages Added Files: admin_close.php Log Message: añadida opcion de cerrar sesion en el panel de admin --- NEW FILE: admin_close.php --- <?php session_destroy(); $view = new view(); $view->ask_login(); ?> <!--<meta http-equiv="refresh" content="0;index.php">--> |
From: Javier B. <jb...@us...> - 2004-11-17 17:59:57
|
Update of /cvsroot/openbash-org/openbash-org/language In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11738/language Modified Files: spanish.php Log Message: añadida opcion de cerrar sesion en el panel de admin Index: spanish.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/language/spanish.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** spanish.php 17 Nov 2004 11:43:32 -0000 1.19 --- spanish.php 17 Nov 2004 17:59:15 -0000 1.20 *************** *** 6,21 **** random => 'Al Azar', browse => 'Navegar', ! add => 'Añadir', ! search => 'Buscar', ! approved => 'Frases aprobadas', ! pending => 'Frases pendientes', ! time => 'Tiempo de proceso' ); $index = array ( ! title => 'OpenBash.org', welcome_message => 'Hola paleto, bienvenid@ al tracker de quotes ' ! .'estúpidas en castellano.', ! news => 'Noticias' ); --- 6,21 ---- random => 'Al Azar', browse => 'Navegar', ! add => 'Añadir', ! search => 'Buscar', ! approved => 'Frases aprobadas', ! pending => 'Frases pendientes', ! time => 'Tiempo de proceso' ); $index = array ( ! title => 'OpenBash.org', welcome_message => 'Hola paleto, bienvenid@ al tracker de quotes ' ! .'estúpidas en castellano.', ! news => 'Noticias' ); *************** *** 25,37 **** reset => 'Reiniciar', tip => 'Puedes enviar quotes que provengan de cualquier tipo ' ! .'de chat: IRC, AIM, Yahoo, etc.<br /><br />' ! .'Consejos para que la quote sea aprobada: quita las ' ! .'marcas de fecha, abrevia el contenido, no añadas ' ! .'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' ); --- 25,37 ---- reset => 'Reiniciar', tip => 'Puedes enviar quotes que provengan de cualquier tipo ' ! .'de chat: IRC, AIM, Yahoo, etc.<br /><br />' ! .'Consejos para que la quote sea aprobada: quita las ' ! .'marcas de fecha, abrevia el contenido, no añadas ' ! .'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' ); *************** *** 41,45 **** quotes => 'Administrar frases', news => 'Administrar noticias', ! users => 'Administrar usuarios' ); --- 41,46 ---- quotes => 'Administrar frases', news => 'Administrar noticias', ! users => 'Administrar usuarios', ! close => 'Cerrar sesión' ); |
From: Javier B. <jb...@us...> - 2004-11-17 17:59:31
|
Update of /cvsroot/openbash-org/openbash-org/pages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11738/pages Modified Files: admin.php admin_general.php header.php Log Message: añadida opcion de cerrar sesion en el panel de admin Index: admin.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/pages/admin.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** admin.php 17 Nov 2004 11:43:32 -0000 1.3 --- admin.php 17 Nov 2004 17:59:16 -0000 1.4 *************** *** 5,31 **** $validate->validate(); ! /* ! * 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'); ?> --- 5,25 ---- $validate->validate(); ! /* ! * 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; ! case 'close' : $admin_page = 'close'; break; ! default : $admin_page = 'general';break; ! } ! } else { ! $admin_page = 'general'; ! } ! include('pages/admin_'.$admin_page.'.php'); ?> Index: header.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/pages/header.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** header.php 17 Nov 2004 11:43:32 -0000 1.12 --- header.php 17 Nov 2004 17:59:21 -0000 1.13 *************** *** 1,3 **** ! <?php /* vim: set sts=2 ts=8 sw=2 noexpandtab: */ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> --- 1,5 ---- ! <?php /* vim: set sts=2 ts=8 sw=2 noexpandtab: */ ! session_start(); ! ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> Index: admin_general.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/pages/admin_general.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** admin_general.php 13 Aug 2004 17:48:06 -0000 1.1 --- admin_general.php 17 Nov 2004 17:59:21 -0000 1.2 *************** *** 4,12 **** <p><?=$admin['welcome']?></p> <ul> ! <li><a href="index.php?page=admin&a_opt=quotes"><?=$admin['quotes']?></a> ! </li> ! <li><a href="index.php?page=admin&a_opt=news"><?=$admin['news']?></a> ! </li> ! <li><a href="index.php?page=admin&a_opt=users"><?=$admin['users']?></a> ! </li> </ul> --- 4,10 ---- <p><?=$admin['welcome']?></p> <ul> ! <li><a href="?page=admin&a_opt=quotes"><?=$admin['quotes']?></a></li> ! <li><a href="?page=admin&a_opt=news"><?=$admin['news']?></a></li> ! <li><a href="?page=admin&a_opt=users"><?=$admin['users']?></a></li> ! <li><a href="?page=admin&a_opt=close"><?=$admin['close']?></a></li> </ul> |
From: Javier B. <jb...@us...> - 2004-11-17 11:43:42
|
Update of /cvsroot/openbash-org/openbash-org/pages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22136/pages Modified Files: admin.php header.php Log Message: mejorada la validacion, ahora se usa la clase Validate Index: admin.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/pages/admin.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin.php 17 Nov 2004 10:19:01 -0000 1.2 --- admin.php 17 Nov 2004 11:43:32 -0000 1.3 *************** *** 1,26 **** <?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 --- 1,8 ---- <?php /* vim: set sts=2 ts=8 sw=2 noexpandtab: */ + include ("modules/View.php"); + include ("modules/Validate.php"); + $validate = new validate(); + $validate->validate(); /* * The user is logged in *************** *** 46,66 **** 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> - <? - } ?> --- 28,31 ---- Index: header.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/pages/header.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** header.php 17 Nov 2004 10:46:48 -0000 1.11 --- header.php 17 Nov 2004 11:43:32 -0000 1.12 *************** *** 36,40 **** / <a href="?page=quote&action=add"><b><?=$sentences['add']?></b></a> / <a href="?page=search"><?=$sentences['search']?></a> ! / # <input type="text" id="quote" class="smalltext" size="4" /> </div> </form> --- 36,40 ---- / <a href="?page=quote&action=add"><b><?=$sentences['add']?></b></a> / <a href="?page=search"><?=$sentences['search']?></a> ! / # <input type="text" id="searchquote" class="smalltext" size="4" /> </div> </form> |
From: Javier B. <jb...@us...> - 2004-11-17 11:43:41
|
Update of /cvsroot/openbash-org/openbash-org/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22136/modules Modified Files: Quote.php View.php Added Files: Validate.php Log Message: mejorada la validacion, ahora se usa la clase Validate --- NEW FILE: Validate.php --- <?php class validate { function validate() { $view = new view(); if(!isset($_SESSION['logged'])) { if (!isset($_POST['form']) || $_POST['form'] != 1) { $view->ask_login(); } else { if(!$this->check_login($_POST['login'], $_POST['passwd'])) { $view->ask_login();} } } else { if(isset($_POST['form']) && !$this->check_login($_POST['login'], $_POST['passwd'])) { $view->ask_login();} if(!$this->check_session()) $view->ask_login(); } } function check_login($nick, $pass) { include ('config.php'); $nick = variable_clean($nick); $pass = variable_clean($pass); $con = "SELECT * FROM users WHERE login LIKE \"$nick\" AND passwd LIKE \"$pass\" LIMIT 1"; $res = $bd->_Execute($con); $res->Close(); if (!$res) return (0); if (!strcmp($nick, $res->fields['login']) && !strcmp($pass, $res->fields['passwd'])) { $_SESSION['logged'] = 1; return (1); } else { $_SESSION['logged'] = 0; return (0); } } function check_session() { if($_SESSION['logged'] == 1) return 1; else return 0; } } ?> Index: View.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/modules/View.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** View.php 17 Nov 2004 10:28:40 -0000 1.4 --- View.php 17 Nov 2004 11:43:32 -0000 1.5 *************** *** 8,11 **** --- 8,15 ---- class view { + /* + * functions related to quotes + */ + function ask_quote() { *************** *** 71,74 **** <?php } ! } --- 75,105 ---- <?php } ! ! /* ! * functions related to admin ! */ ! ! function ask_login() ! { ! global $login_language; ! ?> ! <h5 align="center"><?php echo $login_language['title'];?></h5> ! <hr> ! <p><?=$login_language['msg'];?></p> ! <form action="?page=admin" method="post"> ! <input type="hidden" name="form" value="1"> ! <table border="0" width="50%"> ! <tr class="textoficha"> ! <td><?php echo $login_language['login'];?></td> ! <td><input type="text" name="login" class="textfield" maxlength="20"></td> ! <td><?php echo $login_language['passwd'];?></td> ! <td><input type="password" name="passwd" class="textfield" maxlength="20"><td> ! <td><input type="submit" name="submit" class="submit" value="<?php echo $login_language['submit'];?>"></td> ! </tr> ! </table> ! </form> ! <?php ! exit(); ! } ! } Index: Quote.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/modules/Quote.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Quote.php 17 Nov 2004 10:28:40 -0000 1.9 --- Quote.php 17 Nov 2004 11:43:32 -0000 1.10 *************** *** 92,96 **** * 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); } --- 92,96 ---- * Please visit the admin page to validate: http://$_SERVER[SERVER_NAME]/$_SERVER[SCRIPT_NAME]?page=admin"; ! $from = "From: webmaster@$_SERVER[SERVER_NAME]\nReply-To: $author\nX-Mailer: OpenBash MSG Alert System"; mail($rcpt, $subject, $body, $from); } |
From: Javier B. <jb...@us...> - 2004-11-17 11:43:41
|
Update of /cvsroot/openbash-org/openbash-org/language In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22136/language Modified Files: spanish.php Log Message: mejorada la validacion, ahora se usa la clase Validate Index: spanish.php =================================================================== RCS file: /cvsroot/openbash-org/openbash-org/language/spanish.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** spanish.php 17 Nov 2004 10:28:40 -0000 1.18 --- spanish.php 17 Nov 2004 11:43:32 -0000 1.19 *************** *** 45,56 **** $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.', ! 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.' ); ?> --- 45,64 ---- $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.', ! 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.' ! ); ! ! $login_language = array ( ! title => 'VALIDACIÓN', ! msg => 'Por favor, valídese antes de continuar.', ! login => 'Usuario', ! passwd => 'Contraseña', ! submit => 'Login' ); ?> |