<?
/***
* pLiMa - php List Manager
* Copyright (C) 2003 Jinn Koriech (hide@address.com)
*
* This file is part of pLiMa.
*
* pLiMa is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
* pLiMa is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with pLiMa; if not, visit http://www.gnu.org or write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA
*
*/
?><pre><code><?
echo htmlspecialchars("<form action='".WEB_ROOT."/lib/addremove.php' method='post'>\n");
echo htmlspecialchars("\t<input type='hidden' name='list_name' value='"
.str_replace(TABLE_PREFIX, "", $_SESSION['MALI']."' />\n"));
echo htmlspecialchars("\t<select name='action'>\n");
echo htmlspecialchars("\t\t<option value='add'>Add me!</option>\n");
echo htmlspecialchars("\t\t<option value='remove'>Remove me!</option>\n");
echo htmlspecialchars("\t</select>\n");
$fields = mysql_list_fields(DB_NAME, $_SESSION['MALI']) or die(mysql_error());
for ( $idx = 0; $idx < mysql_num_fields($fields); $idx++ ) {
if ( mysql_field_name($fields, $idx) != 'userid' )
echo htmlspecialchars("\t<input type='text' name='".mysql_field_name($fields, $idx)."' />\n");
}
echo htmlspecialchars("\t<input type='submit' value=' Go ' />\n");
echo htmlspecialchars("</form>\n");
?></code></pre>