<?php/*************************  Coppermine Photo Gallery  ************************  Copyright (c) 2003-2005 Coppermine Dev Team  v1.1 originaly written by Gregory DEMAR  This program is free software; you can redistribute it and/or modify  it under the terms of the GNU General Public License as published by  the Free Software Foundation; either version 2 of the License, or  (at your option) any later version.  ********************************************  Coppermine version: 1.4.4  $Revision: 1.00 $  $Author: AJ (Xplicit) $  $Date: 2006/03/16 00:30:00 $**********************************************/define('IN_COPPERMINE', true);require('include/init.inc.php');if (!GALLERY_ADMIN_MODE) cpg_die(ERROR, $lang_errors['access_denied']);if (isset($_POST['resetalbum'])) {$desired_album = (int)$_POST['resetalbum'];$value = (int)$_POST['value'];    $sql = "UPDATE {$CONFIG['TABLE_PICTURES']} SET hits = $value WHERE aid=$desired_album"; 	$result = cpg_db_query($sql);	pageheader("RESET BEING PERFORMED");echo <<< EOT<form method="post" action="competition.php" name="again">EOT;starttable('80%', "");echo <<< EOT	  <tr>        <td align="center" class="tableh2">          <font size="3" color="red"><b>HITS FOR PICTURES IN ALBUM NR $desired_album SUCCESFULLY SET TO $value<b></font>        </td>      </tr>    	  	<tr>	  <td class="tableb" align="center" >		<input type="submit" value="PERFORM ANOTHER (P)RESET ACTION" class="button" />       <input type="hidden" name="again" value="none" />       </td>     </tr>        EOT;endtable();echo '</form>';EOT;endtable();} else {if (!USER_ID && $CONFIG['allow_unlogged_access'] == 0) {    $redirect = $redirect . "login.php";    header("Location: $redirect");    exit();}pageheader("Reset competition results of a specific album number");echo <<< EOT<form method="post" action="competition.php" name="resetcompetition">EOT;starttable('80%', "");echo <<< EOT	<tr>	  <td  class="tableb" align="left" >		<div align="left"><font size="3"><b>ALBUM ID<b></font>	    <input type="text" style="width: 100" name="resetalbum" maxlength="5" value="" class="textinput" /><BR/>	    </div>       </td>	</tr>	<tr>	<td  class="tableb" align="right" >		<div align="left"><font size="3"><b>PRESET VALUE<b></font>	    <input type="text" style="width: 100" name="value" maxlength="5" value="" class="textinput" /><BR/>	   </div>       </td>     </tr>        		<tr>		<td width="50%" colspan="2" align="center" >			<input type="submit" value="(P)RESET ALL HITS FOR THIS ALBUM" class="button" />		</td>		<tr>EOT;endtable();echo '</form>';}pagefooter();ob_end_flush();?>