예제 #1
0
 * (at your option) any later version.
 *
 * eCamp 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 Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with eCamp.  If not, see <http://www.gnu.org/licenses/>.
 */
include 'inc/get_program_update.php';
$event_instance_id = mysql_real_escape_string($_REQUEST['event_instance_id']);
$start = mysql_real_escape_string($_REQUEST['start']);
$left = mysql_real_escape_string($_REQUEST['left']);
$day_id = mysql_real_escape_string($_REQUEST['day_id']);
$time = mysql_real_escape_string($_REQUEST['time']);
$_camp->event_instance($event_instance_id) ||  die("error");
$_camp->day($day_id) || die("error");
$query = "\tSELECT day_id\n\t\t\t\tFROM event_instance\n\t\t\t\tWHERE id = {$event_instance_id}";
$result = mysql_query($query);
$old_day_id = mysql_result($result, 'day_id');
$query = "UPDATE  `day` SET t_edited = CURRENT_TIMESTAMP WHERE id = " . $old_day_id;
mysql_query($query);
$query = "UPDATE  `day` SET t_edited = CURRENT_TIMESTAMP WHERE id = " . $day_id;
mysql_query($quey);
$query = "\tUPDATE \n\t\t\t\t\tevent_instance \n\t\t\t\tSET \n\t\t\t\t\t`starttime` = '{$start}', \n\t\t\t\t\t`dleft` = '{$left}', \n\t\t\t\t\t`day_id` = '{$day_id}' \n\t\t\t\tWHERE \n\t\t\t\t\t`id` = '{$event_instance_id}';";
$result = mysql_query($query);
header("Content-type: application/json");
$ans = get_program_update($time);
echo json_encode($ans);
die;
예제 #2
0
	{
	$error = "err_msg_".$_GET['warn'];
	VA_Message($$error, "warning");}

IF(IsSet($_GET['err']))
	{
	$error = "err_msg_".$_GET['err'];
	Die(VA_Message($$error, "error"));}
//If user is not loged in include login form (expect about, stats,
//chpass, messages and unban_request page)
ELSEIF(!USR_CLASS && $_GET['q'] != "about" && $_GET['q'] != "stats" && $_GET['q'] != "chpass" && $_GET['q'] != "messages" && $_GET['q'] != "unban_request" && $_GET['q'] != "bantest")
	{Include "login.php";}

//Otherwise include required page
ELSEIF($_GET['q'] != "" && $_GET['q'] != "none") {
	if(substr_count($_GET['q'], "/"))  die("Hacking attempt. You bastard."); 
	IF(!Include $_GET['q'].".php") {
		//If include fails (page is not found or sytax error in script
		//display error message)
		VA_Message($err_msg_not_such_page, "error");
		}
	}
//I don`t remember why it is there ;o))
ELSEIF($_GET['q'] == "none")
	{}
ELSE
{//No page is selected so print database info
?>

<BR><BR>