Esempio n. 1
0
<?php

/*
 * Copyright (C) 2010 Urban Suppiger, Pirmin Mattmann
 *
 * This file is part of eCamp.
 *
 * eCamp is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (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/>.
 */
$camp_del_id = mysql_real_escape_string($_REQUEST[camp_del_id]);
$query = "SELECT * FROM camp WHERE id = '{$camp_del_id}'";
$result = mysql_query($query);
$camp_detail = mysql_fetch_assoc($result);
$index_content['main'] .= gettemplate_app('del_camp', $camp_detail);
Esempio n. 2
0
}
# Geschlechtsoption:
#
###########################
$query = "SELECT * FROM dropdown WHERE list = 'sex' ORDER BY id ASC";
$result = mysql_query($query);
$sex_option = "";
while ($row = mysql_fetch_assoc($result)) {
    $sex_option .= gettemplate_app('option', array("value" => $row[id], "content" => $row[entry], "selected" => ""));
}
# JS Ausbildung:
#
###########################
$query = "SELECT * FROM dropdown WHERE list = 'jsedu' ORDER BY id ASC";
$result = mysql_query($query);
$jsedu_option = "";
while ($row = mysql_fetch_assoc($result)) {
    $jsedu_option .= gettemplate_app('option', array("value" => $row[id], "content" => $row[entry], "selected" => ""));
}
# PBS Ausbildung:
#
###########################
$query = "SELECT * FROM dropdown WHERE list = 'pbsedu' ORDER BY id ASC";
$result = mysql_query($query);
$pbsedu_option = "";
while ($row = mysql_fetch_assoc($result)) {
    $pbsedu_option .= gettemplate_app('option', array("value" => $row[id], "content" => $row[entry], "selected" => ""));
}
$replace = array("std" => $std, "select_function" => gettemplate_app('select', array('name' => "function", "content" => $function_option)), "select_sex" => gettemplate_app('select', array('name' => "sex", "content" => $sex_option)), "select_jsedu" => gettemplate_app('select', array('name' => "jsedu", "content" => $jsedu_option)), "select_pbsedu" => gettemplate_app('select', array('name' => "pbsedu", "content" => $pbsedu_option)), "scoutname" => $scoutname, "firstname" => $firstname, "surname" => $surname, "mail" => $mail);
$index_content['main'] .= gettemplate_app('add_unknown_user', $replace);
Esempio n. 3
0
$query = "SELECT * FROM dropdown WHERE list = 'jsedu' ORDER BY id ASC";
$result = mysql_query($query);
$jsedu_option = "";
while ($row = mysql_fetch_assoc($result)) {
    if ($row[id] == $user[jsedu]) {
        $selected = " selected=selected";
    } else {
        $selected = "";
    }
    $jsedu_option .= gettemplate_app('option', array("value" => $row[id], "content" => $row[entry], "selected" => $selected));
}
# PBS Ausbildung:
#
###########################
$query = "SELECT * FROM dropdown WHERE list = 'pbsedu' ORDER BY id ASC";
$result = mysql_query($query);
$pbsedu_option = "";
while ($row = mysql_fetch_assoc($result)) {
    if ($row[id] == $user[pbsedu]) {
        $selected = " selected=selected";
    } else {
        $selected = "";
    }
    $pbsedu_option .= gettemplate_app('option', array("value" => $row[id], "content" => $row[entry], "selected" => $selected));
}
$user[select_function] = gettemplate_app('select', array('name' => "function", "content" => $function_option));
$user[select_sex] = gettemplate_app('select', array('name' => "sex", "content" => $sex_option));
$user[select_jsedu] = gettemplate_app('select', array('name' => "jsedu", "content" => $jsedu_option));
$user[select_pbsedu] = gettemplate_app('select', array('name' => "pbsedu", "content" => $pbsedu_option));
$index_content['main'] .= gettemplate_app('edit_user', $user);
Esempio n. 4
0
while ($row = mysql_fetch_assoc($reuslt)) {
    if ($row[id] == $std) {
        $selected = " selected=selected ";
    } else {
        $selected = "";
    }
    $option .= gettemplate_app('option', array('value' => $row[id], 'content' => $row[entry], 'selected' => $selected));
}
$select = gettemplate_app('select', array("name" => "function", "content" => $option));
$search_arg = array("1");
if (!empty($scoutname)) {
    $search_arg[] = " scoutname LIKE '{$scoutname}%' ";
}
if (!empty($firstname)) {
    $search_arg[] = " firstname LIKE '{$firstname}%' ";
}
if (!empty($surname)) {
    $search_arg[] = " surname LIKE '{$surname}%' ";
}
if (!empty($mail)) {
    $search_arg[] = " mail LIKE '{$mail}%' ";
}
$query = "SELECT * FROM user WHERE " . implode(" AND ", $search_arg);
$result = mysql_query($query);
$found_users = "";
while ($found = mysql_fetch_assoc($result)) {
    $found['function_list'] = $select;
    $found_users .= gettemplate_app('add_search_result_user', $found);
}
$index_content['main'] .= gettemplate_app('add_search_result', array("content" => $found_users, "scoutname" => $scoutname, "firstname" => $firstname, "surname" => $surname, "mail" => $mail, "std" => $std));
Esempio n. 5
0
    if (!empty($row[scoutname])) {
        $row[user] = $row[scoutname];
    } else {
        $row[user] = $row[firstname] . " " . $row[surname];
    }
    array_push($file_list, gettemplate_app('dp_pdf_file', $row));
}
$data_right['pdf'] = gettemplate_app('dp_pdf_main', array("pdf" => implode("\n", $file_list)));
//	Kommentare:
// =============
$comment_list = array();
$query = "\tSELECT\n\t\t\t\t\tuser.scoutname,\n\t\t\t\t\tuser.firstname,\n\t\t\t\t\tuser.surname,\n\t\t\t\t\tuser.id as user_id,\n\t\t\t\t\tcomment.t_created as time,\n\t\t\t\t\tcomment.text\n\t\t\t\tFROM\n\t\t\t\t\tcomment,\n\t\t\t\t\tuser\n\t\t\t\tWHERE\n\t\t\t\t\tcomment.event_id = {$event_id} AND\n\t\t\t\t\tcomment.user_id = user.id";
$result = mysql_query($query);
while ($row = mysql_fetch_assoc($result)) {
    foreach ($row as $k => $v) {
        $row[$k] = htmlentities($v);
    }
    if (!empty($row[scoutname])) {
        $row[user] = $row[scoutname];
    } else {
        $row[user] = $row[firstname] . " " . $row[surname];
    }
    array_push($comment_list, gettemplate_app('dp_comment_entry', $row));
}
$data_right['comment'] = gettemplate_app('dp_comment_main', array("comment" => implode("\n", $comment_list)));
//$replace = array('data' => "<html><![CDATA[" . implode($data) . "<br />]]></html>", 'error'=> '0');
//$xml = gettemplate_main( "ajax_response", $replace );
header("Content-type: application/html");
//echo $xml;
echo gettemplate_app('dp_main', array("left" => implode($data_left), "right" => implode($data_right)));
die;
Esempio n. 6
0
<?php

/*
 * Copyright (C) 2010 Urban Suppiger, Pirmin Mattmann
 *
 * This file is part of eCamp.
 *
 * eCamp is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (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/>.
 */
$id = mysql_real_escape_string($_REQUEST[id]);
$query = "SELECT id, scoutname, firstname FROM user WHERE id = '{$id}'";
$result = mysql_query($query);
$user_option = mysql_fetch_assoc($result);
if (empty($user_option[scoutname])) {
    $user_option[scoutname] = $user_option[firstname];
}
$index_content['main'] .= gettemplate_app('user_option', $user_option);
Esempio n. 7
0
<?php

/*
 * Copyright (C) 2010 Urban Suppiger, Pirmin Mattmann
 *
 * This file is part of eCamp.
 *
 * eCamp is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (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/>.
 */
$std = $_REQUEST[std];
$index_content['main'] .= gettemplate_app('add_search', array("std" => $std));
Esempio n. 8
0
<?php

/*
 * Copyright (C) 2010 Urban Suppiger, Pirmin Mattmann
 *
 * This file is part of eCamp.
 *
 * eCamp is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (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/>.
 */
$std = $_REQUEST[std];
if ($_camp->is_course) {
    $query = "SELECT * FROM dropdown WHERE list = 'function_course' AND id = '{$std}'";
} else {
    $query = "SELECT * FROM dropdown WHERE list = 'function_camp' AND id = '{$std}'";
}
$result = mysql_query($query);
$function = implode(mysql_fetch_assoc($result));
$index_content['main'] .= gettemplate_app('add', array("function" => $function, "std" => $std));