Ejemplo n.º 1
0
function handle_delete()
{
    global $selected_id;
    if ($selected_id == "") {
        return;
    }
    delete_exchange_rate($selected_id);
    $selected_id = '';
    clear_data();
}
Ejemplo n.º 2
0
function startParse()
{
    $teacherSchedule = get_teacher_schedule("file/TKB.xls");
    $studentSchedule = get_student_schedule("file/SDD.xls", $teacherSchedule);
    clear_data();
    foreach ($teacherSchedule as $s) {
        dal_insert_schedule($s);
    }
    foreach ($studentSchedule as $s) {
        dal_insert_schedule($s);
    }
    echo "Parse OK!";
}
page(_($help_context = "PaySlip"), false, false, "", $js);
if (isset($_GET['selected_id'])) {
    $_POST['selected_id'] = $_GET['selected_id'];
}
if (isset($_GET['month'])) {
    $_POST['month'] = $_GET['month'];
}
if (isset($_GET['year'])) {
    $_POST['year'] = $_GET['year'];
}
$month = get_post('month', '');
$year = get_post('year', '');
$selected_id = get_post('selected_id');
if (list_updated('selected_id')) {
    $_POST['empl_id'] = $selected_id = get_post('selected_id');
    clear_data();
    $Ajax->activate('details');
}
function clear_data()
{
    unset($_POST['empl_id']);
    unset($_POST['empl_name']);
    unset($_POST['gross_salary']);
}
if (isset($_POST['submit'])) {
    if (strlen(trim($_POST['empl_name'])) == 0) {
        display_error(_("The employee name cannot be empty."));
        set_focus('empl_name');
        return false;
    }
    if (isset($_POST['empl_id'])) {
Ejemplo n.º 4
0
<?php

require 'app/start.php';
if (empty($_GET['keywords'])) {
    header('Location: ' . BASE_URL);
} else {
    $keywords = clear_data($_GET['keywords']);
    $sql = "SELECT *\n\t\t\tFROM products\n\t\t\tWHERE title LIKE :keywords\n\t\t\tOR description LIKE :keywords";
    $search = $db->prepare($sql);
    $search->execute([':keywords' => '%' . $keywords . '%']);
    $products = $search->fetchAll(PDO::FETCH_ASSOC);
}
require VIEW_ROOT . '/content/products-result.php';
Ejemplo n.º 5
0
 // Include moduli di comunicazione
 */
// include UserDataHandler
include_once "{$root_dir}/comunica/include/UserDataHandler.inc.php";
// include Message Handler
include_once "{$root_dir}/comunica/include/MessageHandler.inc.php";
/*****************************************************************/
session_controlFN();
// ******************************************************
// Clear node and layout variable
$whatAR = array();
array_push($whatAR, 'node');
array_push($whatAR, 'layout');
array_push($whatAR, 'user');
array_push($whatAR, 'course');
clear_data($whatAR);
$sess_id_course = $_SESSION['sess_id_course'];
$sess_id_course_instance = $_SESSION['sess_id_course_instance'];
$sess_id_user = $_SESSION['sess_id_user'];
//import_request_variables("gP","");
extract($_GET, EXTR_OVERWRITE, ADA_GP_VARIABLES_PREFIX);
extract($_POST, EXTR_OVERWRITE, ADA_GP_VARIABLES_PREFIX);
// ******************************************************
if ($sess_id_course) {
    // get object course
    $courseObj = read_course_from_DB($sess_id_course);
    if ($dh->isError($courseObj)) {
        $errObj = $courseObj;
        $msg = $errObj->errorMessage();
        header("Location:{$error_page}?err_msg={$msg}");
        exit;
Ejemplo n.º 6
0
function update_data_array($urls)
{
    global $messages, $error, $text, $added, $modified;
    $added = array();
    $modified = array();
    $cleared = false;
    foreach ($urls as $url) {
        if (substr($url, 0, 4) == 'http') {
            $messages[] = sprintf(_('Reading URL %s'), $url);
        } elseif (isset($_FILES['file']['name'])) {
            $messages[] = sprintf(_('Reading file %s'), $_FILES['file']['name']);
        }
        $data = parse_osm_xml($url);
        if ($data && count($data) > 0) {
            if (!$cleared && isset($_REQUEST['replace'])) {
                clear_data();
                $text = '';
                $cleared = true;
            }
            update_data($data);
            if ($error) {
                break;
            }
        }
    }
    store_base();
    if (count($added) + count($modified) > 0) {
        $text = update_text($text);
    }
}