Example #1
1
        $j++;
    }
}
sql_free_result($res_member);
sql_close($sgbd);
# liste des clubs
$page['club'] = array();
if ($page['aff_club'] == 1) {
    include_once create_path("club/sql_club.php");
    include_once create_path("club/lg_club_" . LANG . ".php");
    include_once create_path("club/tpl_club.php");
    $var['condition'] = "";
    $var['order'] = "";
    $var['limit'] = "";
    $included = 1;
    include create_path("club/club_list.php");
    unset($included);
    $page['club'] = $page['club'];
}
$page['form_action'] = convert_url("index.php?r=" . $lang['general']['idurl_member'] . "&v1=manager_list");
if ($right_user['add_member']) {
    $page['link_add'] = convert_url("index.php?r=" . $lang['general']['idurl_member'] . "&v1=form_member");
} else {
    $page['link_add'] = "";
}
$page['L_add'] = $lang['member']['add_member'];
$page['L_choose_season'] = $lang['member']['choose_season'];
$page['L_dirigeant'] = $lang['member']['dirigeant'];
$page['L_job'] = $lang['member']['job'];
$page['L_choose_club'] = $lang['member']['choose_club'];
$page['L_title'] = $lang['member']['member_job_list'];
Example #2
0
 function create()
 {
     $this->bep_assets->load_asset_group('TINYMCE');
     if ($this->input->post('name')) {
         //$this->MCats->addCategory();
         $data = $this->_fields();
         $this->MKaimonokago->addItem($this->module, $data);
         $string = $this->input->post('name');
         // createdirname function is from plugin mytools.php
         $folder = createdirname($string);
         $folder = 'assets/images/' . $folder;
         create_path($folder);
         // we used to use like this. $this->session->set_flashdata('message','Category created');
         // now we are using Bep's flashMsg function to show messages.
         flashMsg('success', $this->lang->line('userlib_category_created'));
         redirect($this->module . '/admin/index', 'refresh');
     } else {
         $data['title'] = "Create Category";
         $data['categories'] = $this->MCats->getTopCategories();
         //$data['right'] = 'admin/category_right';
         // Set breadcrumb
         $this->bep_site->set_crumb($this->lang->line('userlib_create') . " category", 'category/admin/create');
         $data['header'] = $this->lang->line('backendpro_access_control');
         // This is how BackendPro do
         $data['page'] = $this->config->item('backendpro_template_admin') . "admin_cat_create";
         $data['cancel_link'] = $this->module . "/admin/index/";
         $data['module'] = $this->module;
         $this->load->view($this->_container, $data);
     }
 }
Example #3
0
function move_filtered_file($source, $target, $subs)
{
    if (!file_exists($source)) {
        throw new Exception("Source file {$source} doesn't exist");
    }
    if (file_exists($target)) {
        throw new Exception("Target file {$target} already exists");
    }
    $contents = filter_contents(file_get_contents($source), $subs);
    create_path(dirname($target));
    $fp = fopen($target, "w+");
    if (!$fp) {
        throw new Exception("Couldn't open target {$target} for write");
    }
    fwrite($fp, $contents);
    fclose($fp);
}
Example #4
0
<?php

# we define the rights available for fields
include_once create_path("field/lg_field_" . LANG . ".php");
$right['field'] = array(array('id' => 'view_field', 'name' => $lang['field']['view_field'], 'default' => 1), array('id' => 'field_list', 'name' => $lang['field']['field_list'], 'default' => 1), array('id' => 'add_field', 'name' => $lang['field']['add_field'], 'default' => 0), array('id' => 'edit_field', 'name' => $lang['field']['edit_field'], 'default' => 0), array('id' => 'delete_field', 'name' => $lang['field']['delete_field'], 'default' => 0));
Example #5
0
<?php

include create_path("include/sgbd/mysql/mysql_fonctions.php");
Example #6
0
<?php

include_once create_path("information/sql_information.php");
include_once create_path("information/lg_information_" . LANG . ".php");
include_once create_path("information/tpl_information.php");
if (!isset($_GET['v1']) or $_GET['v1'] == "") {
    include create_path("information/page_list.php");
} else {
    switch ($_GET['v1']) {
        case "form_page":
            include create_path("information/form_page.php");
            break;
        case "page_list":
            include create_path("information/page_list.php");
            break;
        default:
            include create_path("information/view_page.php");
    }
}
Example #7
0
<?php

# we define the rights available for team
include_once create_path("team/lg_team_" . LANG . ".php");
$right['team'] = array(array('id' => 'view_team', 'name' => $lang['team']['view_team'], 'default' => 1), array('id' => 'team_list', 'name' => $lang['team']['team_list'], 'default' => 1), array('id' => 'add_team', 'name' => $lang['team']['add_team'], 'default' => 0), array('id' => 'edit_team', 'name' => $lang['team']['edit_team'], 'default' => 0), array('id' => 'delete_team', 'name' => $lang['team']['delete_team'], 'default' => 0), array('id' => 'team_coach_list', 'name' => $lang['team']['team_coach_list'], 'default' => 1), array('id' => 'team_player_list', 'name' => $lang['team']['team_player_list'], 'default' => 1), array('id' => 'position_list', 'name' => $lang['team']['position_list'], 'default' => 0), array('id' => 'team_name_list', 'name' => $lang['team']['team_name_list'], 'default' => 0));
Example #8
0
function fp_loadfile($Frm, $Err)
{
    global $order_id;
    if (!$Err) {
        $f = $Frm->GetValue(0);
        //$f["tmp_name"]
        //$f["name"]
        //$f["size"]
        //$f["type"]
        if (is_uploaded_file($f["tmp_name"])) {
            $extension = get_file_ext($f['name']);
            if (trim($Frm->GetValueH(1)) == "") {
                $name = $f["name"];
            } else {
                $name = trim($Frm->GetValueH(1)) . '.' . $extension;
            }
            $file_id = Order::attachFile($order_id, $_SESSION["user"]["data"]["id"], $name, $f["size"]);
            if (!$file_id) {
                $Frm->_gui->ERR("Ошибка при загрузке");
            } else {
                $dir = DIR_FS_ORDER_FILES . $order_id . '/';
                if (!is_dir(DIR_FS_ORDER_FILES)) {
                    create_path('order_files', DIR_FS_DOCUMENT_ROOT);
                }
                if (!is_dir($dir)) {
                    create_path($order_id, DIR_FS_ORDER_FILES);
                }
                $file_name = $file_id . '.' . $extension;
                if (move_uploaded_file($f['tmp_name'], $dir . $file_name)) {
                    $Frm->_gui->OK("Файл загружен");
                    if ($_SESSION["user"]["data"]["group_id"] == 6 && get_order_author_id($order_id) == $_SESSION["user"]["data"]["id"]) {
                        $res = change_order_status($order_id, 'RECEIVED_FILE_FROM_AUTHOR');
                        if ($res == 1) {
                            $Frm->_gui->OK("Статус заказа изменен");
                        } else {
                            $Frm->_gui->ERR($res);
                        }
                    }
                } else {
                    Order::deleteAttachedFile($file_id);
                    $Frm->_gui->ERR("Ошибка при сохранении файла");
                }
            }
            page_reloadAll();
        }
    }
}
Example #9
0
    header('Content-type: text/html; charset=' . $lang['general']['charset']);
}
$show_stats = $ms_column;
$nb_club_max = MS_NB_CLUB_MAX;
$page['ms_show_form'] = MS_SHOW_FORM;
if (!isset($_POST['season']) and MS_SEASON != '') {
    $page['value_season'] = MS_SEASON;
}
if (!isset($_POST['competition']) and MS_COMPETITION != '') {
    $page['value_competition'] = MS_COMPETITION;
}
if (!isset($_POST['round']) and MS_ROUND != '') {
    $page['value_round'] = MS_ROUND;
}
$included = 1;
include create_path("match/standings.php");
unset($included);
if ($page['ms_show_form'] == 0) {
    $page['season'] = array();
    $page['competition'] = array();
    $page['round'] = array();
}
# link
$page['form_action'] = convert_url("index.php?r=" . $lang['general']['idurl_match'] . "&v1=mini_standings");
$page['link_standings'] = convert_url("index.php?r=" . $lang['general']['idurl_match'] . "&v1=standings&v2=" . $page['value_competition'] . "&v3=" . $page['value_round'] . "&v4=" . $page['value_season']);
# text
$page['L_place'] = $lang['match']['place_ab'];
$page['L_show_standings'] = $lang['match']['show_standings'];
# template
if (!isset($included_mini_standings) or $included_mini_standings == 0) {
    $page['fen'] = "ajax";
Example #10
0
<?php

# we define the rights available for administration
include_once create_path("administration/lg_administration_" . LANG . ".php");
$right['administration'] = array(array('id' => 'home', 'name' => $lang['administration']['home_administration'], 'default' => 0), array('id' => 'admin', 'name' => $lang['administration']['administration_zone'], 'default' => 0), array('id' => 'configuration', 'name' => $lang['administration']['configuration'], 'default' => 0), array('id' => 'menu_management', 'name' => $lang['administration']['menu_management'], 'default' => 0), array('id' => 'right_management', 'name' => $lang['administration']['right_management'], 'default' => 0), array('id' => 'plugin_management', 'name' => $lang['administration']['plugin_management'], 'default' => 0));
Example #11
0
             $new_weather[$new_id] = $_POST['new_value'][$i];
         } elseif ($_POST['new_value_type'][$i] == "field_state") {
             $var['name'] = $_POST['new_value'][$i];
             $sql_insert_new = sql_replace($sql['match']['insert_field_state'], $var);
             sql_query($sql_insert_new, $sgbd);
             $new_id = sql_insert_id($sgbd);
             $new_field_state[$new_id] = $_POST['new_value'][$i];
         } elseif ($_POST['new_value_type'][$i] == "field") {
             $var['name'] = $_POST['new_value'][$i];
             $sql_insert_new = sql_replace($sql['field']['insert_field_name'], $var);
             sql_query($sql_insert_new, $sgbd);
             $new_id = sql_insert_id($sgbd);
             $new_field[$new_id] = $_POST['new_value'][$i];
         } elseif ($_POST['new_value_type'][$i] == "club") {
             $var['name'] = $_POST['new_value'][$i];
             include_once create_path('club/sql_club.php');
             $sql_insert_new = sql_replace($sql['club']['insert_club_name'], $var);
             sql_query($sql_insert_new, $sgbd);
             $new_id = sql_insert_id($sgbd);
             $new_club[$new_id] = $_POST['new_value'][$i];
         } elseif ($_POST['new_value_type'][$i] == "competition") {
             $var['name'] = $_POST['new_value'][$i];
             $sql_insert_new = sql_replace($sql['competition']['insert_competition'], $var);
             sql_query($sql_insert_new, $sgbd);
             $new_id = sql_insert_id($sgbd);
             $new_competition[$new_id] = $_POST['new_value'][$i];
         }
     }
 }
 # correspondance des colonnes
 $nb_column = sizeof($_POST['match_field']);
Example #12
0
    include create_path("team/team_list.php");
} else {
    switch ($_GET['v1']) {
        case "form_team":
            include create_path("team/form_team.php");
            break;
        case "view":
            include create_path("team/view_team.php");
            break;
        case "team_list":
            include create_path("team/team_list.php");
            break;
        case "coach_list":
            include create_path("team/team_coach_list.php");
            break;
        case "player_list":
            include create_path("team/team_player_list.php");
            break;
        case "position_list":
            include create_path("team/position_list.php");
            break;
        case "team_name_list":
            include create_path("team/team_name_list.php");
            break;
        case "select_team_club":
            include create_path("team/select_team_club.php");
            break;
        default:
            include create_path("team/team_list.php");
    }
}
Example #13
0
$page['team_player'] = array();
$page['link_first_page'] = "";
$page['link_previous_page'] = "";
$page['link_last_page'] = "";
$page['link_next_page'] = "";
$page['L_message_team_player'] = "";
if (isset($_POST['season']) and !empty($_POST['season'])) {
    $var['value_season'] = $_POST['season'];
}
# liste des seasons
$page['season'] = array();
include_once create_path("competition/sql_competition.php");
include_once create_path("competition/lg_competition_" . LANG . ".php");
include_once create_path("competition/tpl_competition.php");
$included = 1;
include create_path("competition/season_list.php");
unset($included);
$page['season'] = $page['season'];
if (!isset($page['season']['0']['id']) or empty($page['season']['0']['id'])) {
    $var['value_season'] = "";
} elseif (!isset($var['value_season']) or empty($var['value_season'])) {
    $var['value_season'] = $page['season']['0']['id'];
}
# mode club
$page['aff_club'] = "1";
if (CLUB != 0) {
    $page['value_club'] = CLUB;
    $page['aff_club'] = "";
}
# TRI
# $_GET['v1'] is a variable like : page_1_name_asc
Example #14
0
<?php

# we define the rights available for competitions
include_once create_path("competition/lg_competition_" . LANG . ".php");
$right['competition'] = array(array('id' => 'view_competition', 'name' => $lang['competition']['view_competition'], 'default' => 1), array('id' => 'competition_list', 'name' => $lang['competition']['competition_list'], 'default' => 1), array('id' => 'add_competition', 'name' => $lang['competition']['add_competition'], 'default' => 0), array('id' => 'edit_competition', 'name' => $lang['competition']['form_competition_edit'], 'default' => 0), array('id' => 'delete_competition', 'name' => $lang['competition']['delete_competition'], 'default' => 0), array('id' => 'season_list', 'name' => $lang['competition']['season_list'], 'default' => 0));
Example #15
0
unset($included);
$page['match'] = $page['match'];
if ($page['nb_match'] > 0) {
    $page['L_match'] = $lang['match']['match'];
    $page['L_match_sans_score'] = $lang['match']['E_empty_score'];
    $page['show_match'] = "1";
}
# Registration to validate
$page['show_member'] = "";
$page['member'] = array();
if (REGISTRATION) {
    include_once create_path("member/sql_member.php");
    include_once create_path("member/lg_member_" . LANG . ".php");
    include_once create_path("member/tpl_member.php");
    $included = 1;
    include create_path("member/registration_list.php");
    unset($included);
    //$page['nb_member']=$page['nb_member'];
    //$page['member']=$page['member'];
    if ($page['nb_registration'] > 0) {
        $page['L_registration_list'] = $lang['member']['registration_list'];
        $page['L_registration_list_info'] = $lang['member']['registration_list_info'];
        $page['link_registration_list'] = convert_url("index.php?r=" . $lang['general']['idurl_member'] . "&v1=registration_list");
        $page['L_member_a_activer'] = $lang['member']['member_a_activer'];
        $page['show_member'] = "1";
    }
}
# we check if there is some plugin available that need to be installed
$page['plugin'] = array();
$page['show_plugin'] = "";
if ($right_user['plugin_management']) {
Example #16
0
    while ($ligne = sql_fetch_array($res_liste)) {
        $page['position'][$i]['id'] = $ligne['position_id'];
        $page['position'][$i]['name'] = $ligne['position_name'];
        if (isset($_POST['position']) and $_POST['position'] = $ligne['position_id']) {
            $page['position'][$i]['selected'] = "selected";
        } else {
            $page['position'][$i]['selected'] = "";
        }
        $i++;
    }
    sql_free_result($res_liste);
    sql_close($sgbd);
}
# liste des sexs
$page['sex'] = array();
include_once create_path("member/sql_member.php");
$sql_sex = $sql['member']['select_sex'];
$sgbd = sql_connect();
$res_sex = sql_query($sql_sex);
$nb_ligne = sql_num_rows($res_sex);
if ($nb_ligne != "0") {
    $i = "0";
    while ($ligne = sql_fetch_array($res_sex)) {
        $page['sex'][$i]['id'] = $ligne['sex_id'];
        $page['sex'][$i]['name'] = $ligne['sex_name'];
        if (isset($page['value_sex']) and $page['value_sex'] == $ligne['sex_id']) {
            $page['sex'][$i]['checked'] = "checked=\"checked\"";
        } else {
            $page['sex'][$i]['checked'] = "";
        }
        $page['sex'][$i]['link_select_member'] = convert_url("index.php?r=" . $lang['general']['idurl_member'] . "&v1=select_member");
Example #17
0
<?php

##################################
# member : registration
##################################
include_once create_path("club/sql_club.php");
# variables
$page['L_message'] = "";
$nb_erreur = "0";
$page['erreur'] = array();
$page['sex'] = array();
# form values
$page['value_id'] = "";
$page['value_name'] = "";
$page['value_firstname'] = "";
$page['value_email'] = "";
$page['value_date_birth'] = "";
$page['value_sex'] = "";
$page['value_login'] = "";
$page['value_description'] = "";
$page['value_avatar'] = "";
$page['show_form'] = 1;
if (REGISTRATION == 0) {
    $page['L_message'] = $lang['member']['E_no_registration'];
    $page['show_form'] = '';
}
# case of add
if (REGISTRATION == 1 and isset($_POST) and !empty($_POST)) {
    # we format datas
    if (isset($_POST['name'])) {
        $_POST['name'] = format_txt($_POST['name']);
Example #18
0
<?php

# we define the rights available for clubs
include_once create_path("club/lg_club_" . LANG . ".php");
$right['club'] = array(array('id' => 'view_club', 'name' => $lang['club']['view_club'], 'default' => 1), array('id' => 'club_list', 'name' => $lang['club']['club_list'], 'default' => 1), array('id' => 'add_club', 'name' => $lang['club']['add_club'], 'default' => 0), array('id' => 'edit_club', 'name' => $lang['club']['edit_club'], 'default' => 0), array('id' => 'delete_club', 'name' => $lang['club']['delete_club'], 'default' => 0), array('id' => 'import_club', 'name' => $lang['club']['import_club'], 'default' => 0));
 /**
  * Upload the filename to a filepath.
  *
  * @param string $pathname The absolute folder WITHOUT trailing slash
  * @param int $status Exception code
  * @param string $filename File name without extension
  * @param string $ext File extension with dot
  * @param string $mime MIME type
  */
 public function uploadTo($pathname, &$status, &$filename = null, &$ext = null, &$mime = null)
 {
     if (!$this->uploadRequestOK()) {
         $status = UPLOAD_EXTRA_ERR_INVALID_REQUEST;
         return false;
     }
     switch ($_FILES[$this->fileEntry]['error']) {
         case UPLOAD_ERR_NO_FILE:
         case UPLOAD_ERR_INI_SIZE:
         case UPLOAD_ERR_FORM_SIZE:
         case UPLOAD_ERR_PARTIAL:
         case UPLOAD_ERR_NO_TMP_DIR:
         case UPLOAD_ERR_CANT_WRITE:
         case UPLOAD_ERR_EXTENSION:
             // Return the same error
             $status = $_FILES[$this->fileEntry]['error'];
             return false;
         case UPLOAD_ERR_OK:
             // It's OK
             break;
         default:
             DEBUG && error(sprintf(_("FileUploader ha ottenuto un errore sconosciuto: %d."), $_FILES[$this->fileEntry]['error']));
             $status = UPLOAD_EXTRA_ERR_GENERIC_ERROR;
             return false;
     }
     // Check filesize
     if ($this->args['max-filesize'] !== null && $_FILES[$this->fileEntry]['size'] > $this->args['max-filesize']) {
         $status = UPLOAD_EXTRA_ERR_OVERSIZE;
         return false;
     }
     // Check original MIME type
     $mime = get_mimetype($_FILES[$this->fileEntry]['tmp_name']);
     if (!$mime) {
         $status = UPLOAD_EXTRA_ERR_CANT_READ_MIMETYPE;
         return false;
     }
     // Check if MIME type it's allowed
     if (!$GLOBALS['mimeTypes']->isMimetypeInCategory($mime, $this->args['category'])) {
         $status = UPLOAD_EXTRA_ERR_UNALLOWED_MIMETYPE;
         return false;
     }
     // Check original file extension
     $ext = $GLOBALS['mimeTypes']->getFileExtensionFromExpectations($_FILES[$this->fileEntry]['name'], $this->args['category'], $mime);
     if (!$ext) {
         $status = UPLOAD_EXTRA_ERR_UNALLOWED_FILE;
         return false;
     }
     if ($this->args['override-filename'] === null) {
         // Strip original complete file name from extension
         $filename = substr($_FILES[$this->fileEntry]['name'], 0, -(strlen($ext) + 1));
     } else {
         // Override file name
         $filename = $this->args['override-filename'];
     }
     // Append prefix (if any)
     $filename = $this->args['pre-filename'] . $filename;
     if ($this->args['slug']) {
         $filename = generate_slug($filename);
     }
     // Make sure that the destination folder exists
     create_path($pathname);
     // Append a suffix to the filename if it already exists
     $filename = search_free_filename($pathname . _, $filename, $ext, $this->args);
     // File name with extension
     $complete_filename = "{$filename}.{$ext}";
     // File name length
     if (strlen($complete_filename) < $this->args['min-length-filename']) {
         $status = UPLOAD_EXTRA_ERR_FILENAME_TOO_SHORT;
         return false;
     }
     // File name length
     if (strlen($complete_filename) > $this->args['max-length-filename']) {
         $status = UPLOAD_EXTRA_ERR_FILENAME_TOO_LONG;
         return false;
     }
     $moved = move_uploaded_file($_FILES[$this->fileEntry]['tmp_name'], $pathname . _ . $complete_filename);
     if (!$moved) {
         $status = UPLOAD_EXTRA_ERR_CANT_SAVE_FILE;
         return false;
     }
     $status = UPLOAD_ERR_OK;
     return $complete_filename;
 }
Example #20
0
include_once create_path("match/lg_match_" . LANG . ".php");
include_once create_path("match/tpl_match.php");
$var['condition'] = " WHERE m.match_date >= NOW() ";
$var['order'] = " ORDER BY m.match_date ASC ";
$var['limit'] = " LIMIT 0," . HOME_NB_MATCH . " ";
include create_path("match/match_list.php");
$page['next_matches'] = $page['match'];
$page['L_message_next_matches'] = $page['L_message_match'];
# Last matches list
include_once create_path("match/sql_match.php");
include_once create_path("match/lg_match_" . LANG . ".php");
include_once create_path("match/tpl_match.php");
$var['condition'] = " WHERE m.match_date < NOW() AND m.match_score_visitor IS NOT NULL ";
$var['order'] = " ORDER BY m.match_date DESC ";
$var['limit'] = " LIMIT 0," . HOME_NB_MATCH . " ";
include create_path("match/match_list.php");
unset($included);
# Mini-standings
$page['mini_standings'] = '';
if (MS_SHOW == 'home') {
    $page['mini_standings'] = $_SESSION['session_mini_standings'];
}
# text
$page['last_matches'] = $page['match'];
$page['L_message_last_matches'] = $page['L_message_match'];
$page['L_match'] = $lang['match']['match'];
$page['L_match_home'] = $lang['match']['home'];
$page['L_match_visitor'] = $lang['match']['visitor'];
$page['L_next_matches'] = $lang['match']['next_matches'];
$page['L_last_matches'] = $lang['match']['last_matches'];
$page['L_view_match_list'] = $lang['match']['view_list'];
Example #21
0
     sql_free_result($res_weather);
     $page['weather'] = $ligne_weather['weather_name'];
 }
 # field_state
 if (!empty($ligne['field_state_id'])) {
     $var['id'] = $ligne['field_state_id'];
     $sgbd = sql_connect();
     $sql_field_state = sql_replace($sql['match']['select_field_state_details'], $var);
     $res_field_state = sql_query($sql_field_state);
     $ligne_field_state = sql_fetch_array($res_field_state);
     sql_free_result($res_field_state);
     $page['field_state'] = $ligne_field_state['field_state_name'];
 }
 # field
 if (!empty($ligne['field_id'])) {
     include_once create_path("field/sql_field.php");
     $var['id'] = $ligne['field_id'];
     $sgbd = sql_connect();
     $sql_field = sql_replace($sql['field']['select_field_details'], $var);
     $res_field = sql_query($sql_field);
     $ligne_field = sql_fetch_array($res_field);
     sql_free_result($res_field);
     $page['field'] = $ligne_field['field_name'];
     $page['link_field'] = convert_url("index.php?r=" . $lang['general']['idurl_field'] . "&v1=view&v2=" . $ligne_field['field_id']);
 }
 sql_close($sgbd);
 # On determine la season dans laquelle se joue le match
 /*
 $var['date']=convert_date($page['date_sql'],$lang['match']['format_date_sql']);
 include_once(create_path("competition/sql_competition.php"));
 $sql_season=sql_replace($sql['competition']['select_season_date'],$var);
Example #22
0
    }
    if (!in_array($ligne['season_id'], $season_job)) {
        $page['season_job'][$j]['i'] = $j;
        $page['season_job'][$j]['id'] = $ligne['season_id'];
        $page['season_job'][$j]['name'] = $ligne['season_name'];
        $page['season_job'][$j]['abbreviation'] = $ligne['season_abbreviation'];
        $j++;
    }
}
# liste des groupes
$page['group'] = array();
$page['value_member_group'] = $page['value_status'];
$page['L_group'] = $lang['member']['choose_group'];
if ($right_user['group_list']) {
    $included = 1;
    include create_path('member/group_list.php');
    unset($included);
}
$page['status'] = $page['group'];
# status
/*
$page['status']=array();
$page['status']['0']['id']="0";
$page['status']['0']['name']=$lang['member']['status_0'];
$page['status']['0']['info']=$lang['member']['status_member_info'];
$page['status']['0']['checked']="";
$page['status']['1']['id']="1";
$page['status']['1']['name']=$lang['member']['status_1'];
$page['status']['1']['info']=$lang['member']['status_admin_info'];
$page['status']['1']['checked']="";
$page['status']['2']['id']="2";
Example #23
0
    $var['condition'] = " WHERE e.club_id='" . $page['id'] . "'";
    $var['order'] = " ORDER BY ne.team_name_order ";
    $var['limit'] = "";
    include create_path("team/team_list.php");
    unset($included);
    $page['team'] = $page['team'];
    $page['L_team'] = $lang['team']['team_list'];
}
# managers of the club list
$page['season_defaut'] = "";
$page['season'] = array();
include_once create_path("competition/sql_competition.php");
include_once create_path("competition/lg_competition_" . LANG . ".php");
include_once create_path("member/sql_member.php");
include_once create_path("member/lg_member_" . LANG . ".php");
include_once create_path("competition/tpl_competition.php");
$sql_liste = $sql['competition']['select_season'];
$sgbd = sql_connect();
$res_liste = sql_query($sql_liste);
$nb_ligne_s = sql_num_rows($res_liste);
$is = "0";
$page['nb_dirigeant'] = 0;
while ($ligne = sql_fetch_array($res_liste)) {
    # manager for the season
    $var['condition'] = " WHERE mc.club_id='" . $page['id'] . "' AND mc.season_id='" . $ligne['season_id'] . "' AND mf.season_id='" . $ligne['season_id'] . "'";
    $var['order'] = " ORDER BY f.job_name ASC";
    $var['limit'] = "";
    $sql_dirigeant = sql_replace($sql['member']['select_member_job_club'], $var);
    $sgbd = sql_connect();
    $res_dirigeant = sql_query($sql_dirigeant);
    $nb_ligne_dirigeant = sql_num_rows($res_dirigeant);
Example #24
0
    $page['round'] = $page['round'];
}
$page['L_group'] = $lang['competition']['group'];
$page['L_day'] = $lang['competition']['day'];
# round details
$page['display_group'] = "none";
$page['display_day'] = "none";
if (isset($var['value_round']) and $var['value_round'] != "0") {
    $var['header'] = 0;
    $var['id'] = $page['value_round'];
    $var['competition'] = $page['value_competition'];
    $var['season'] = $page['value_season'];
    $var['group'] = $page['value_group'];
    $var['day'] = $page['value_day'];
    $included = 1;
    include create_path("competition/select_round_all_details.php");
    unset($included);
    $page['group'] = $page['group'];
    $page['day'] = $page['day'];
    if ($page['show_group'] == 1) {
        $page['display_group'] = "block";
    }
    if ($page['show_day'] == 1) {
        $page['display_day'] = "block";
    }
}
# links
$page['link_match'] = convert_url("index.php?r=" . $lang['general']['idurl_match'] . "&v1=match_list");
$page['link_tri_date'] = convert_url("index.php?r=" . $lang['general']['idurl_match'] . "&v1=page_" . $page_num . "_date_" . $sens_inv);
$page['form_action'] = convert_url("index.php?r=" . $lang['general']['idurl_match'] . "&v1=match_list");
$page['link_import_match'] = '';
Example #25
0
<?php

include_once create_path("administration/tpl_administration.php");
include_once create_path("administration/lg_administration_" . LANG . ".php");
if (!isset($_GET['v1'])) {
    if (!$right_user['home']) {
        header("location:" . convert_url("index.php?r=" . $lang['general']['idurl_member'] . "&v1=form_connection") . "");
        exit;
    } else {
        include create_path("administration/home.php");
    }
} else {
    switch ($_GET['v1']) {
        case "admin":
            include create_path("administration/admin.php");
            break;
        case "configuration":
            include create_path("administration/configuration.php");
            break;
        case "menu-management":
            include create_path("administration/menu_management.php");
            break;
        case "right-management":
            include create_path("administration/right_management.php");
            break;
    }
}
Example #26
0
File: init.php Project: rit-sse/api
#!/usr/bin/env php
<?php 
$DIR = dirname(__FILE__);
function create_path($path = '.')
{
    if (!file_exists($path)) {
        mkdir($path);
    }
}
print 'Setting up basic environment variables.' . PHP_EOL;
copy($DIR . '/../.env.example', $DIR . '/../.env');
print 'Setting up application directories.' . PHP_EOL;
create_path($DIR . '/../storage/app');
create_path($DIR . '/../storage/framework');
create_path($DIR . '/../storage/framework/sessions');
create_path($DIR . '/../storage/logs');
print 'Creating empty development database.' . PHP_EOL;
touch($DIR . '/../storage/development.db');
if (chdir($DIR . '/..')) {
    print 'Generating random application key.' . PHP_EOL;
    exec('php artisan key:generate');
    print 'Running database migrations and seeds.' . PHP_EOL;
    exec('php artisan migrate:refresh --seed');
} else {
    print 'Failed to change working directory, please file an issue.' . PHP_EOL;
}
Example #27
0
        define("ROOT", "../");
    }
    if (!defined("ROOT_URL")) {
        define("ROOT_URL", ".");
    }
    if (!defined("LANG")) {
        define("LANG", "en");
    }
    if (!defined("TPL_DOSSIER")) {
        define("TPL_DOSSIER", "defaut");
    }
    if (!defined("SGBD_PREFIX")) {
        define("SGBD_PREFIX", "");
    }
    include_once create_path("installation/lg_installation_" . LANG . ".php");
    include_once create_path("include/lg_general_" . LANG . ".php");
} else {
    # c'est la premire installation
    $type_installation = "installation";
    define("ROOT", "../");
    define("ROOT_URL", "");
    define("TPL_DOSSIER", "defaut");
    define("URL_REWRITE", 0);
    define("VERSION", VERSION_SITE);
    define("SGBD_PREFIX", "");
    if (isset($_GET['lg']) and in_array($_GET['lg'], $lang_supportee)) {
        define("LANG", $_GET['lg']);
        include_once "lg_installation_" . LANG . ".php";
        include_once "../include/lg_general_" . LANG . ".php";
    } elseif (isset($_GET['r']) and $_GET['r'] != "home") {
        header("location:index.php");
Example #28
0
unset($included);
$tmp = $page['stats'];
$page['standings'] = $page['standings'];
$page['L_message_standings'] = $page['L_message_standings'];
$page['L_standings'] = $lang['match']['standings'];
$page['L_show_standings'] = $lang['match']['show_standings'];
# stats_player
$page['show_form'] = "";
$page['value_limit'] = " LIMIT 30 ";
if (empty($page['value_group'])) {
    $page['value_group'] = array();
} else {
    $page['value_group'] = array($page['value_group']);
}
$included = 1;
include create_path("match/stats_player.php");
unset($included);
$page['match_stats_player'] = $page['stats_player'];
$page['stats_player'] = $page['stats'];
$page['L_stats_player'] = $lang['match']['stats_player'];
$page['L_show_stats_player'] = $lang['match']['show_stats_player'];
$page['stats'] = $tmp;
# modification
$page['link_edit'] = "";
$page['link_delete'] = "";
if ($right_user['edit_competition']) {
    $page['link_edit'] = convert_url("index.php?r=" . $lang['general']['idurl_competition'] . "&v1=form_competition&v2=" . $page['id']);
}
if ($right_user['edit_competition']) {
    $page['link_delete'] = convert_url("index.php?r=" . $lang['general']['idurl_competition'] . "&v1=competition_list&v2=delete&v3=" . $page['id']);
}
Example #29
0
include_once create_path("competition/tpl_competition.php");
include_once create_path("competition/lg_competition_" . LANG . ".php");
if (!isset($_GET['v1'])) {
    include create_path("competition/competition_list.php");
} else {
    switch ($_GET['v1']) {
        case "form_competition":
            include create_path("competition/form_competition.php");
            break;
        case "view":
            include create_path("competition/view_competition.php");
            break;
        case "competition_list":
            include create_path("competition/competition_round_list.php");
            break;
        case "season_list":
            include create_path("competition/season_list.php");
            break;
        case "select_round":
            include create_path("competition/select_round.php");
            break;
        case "select_round_details":
            include create_path("competition/select_round_details.php");
            break;
        case "select_round_all_details":
            include create_path("competition/select_round_all_details.php");
            break;
        default:
            include create_path("competition/competition_round_list.php");
    }
}
Example #30
0
                break;
            default:
                # if plugin
                if (in_array($_GET['r'], $plugin_list)) {
                    $key = array_search($_GET['r'], $plugin_list);
                    # we search for the key corresponding to the value
                    $plugin[$key]['class'] = 'on';
                    require_once $plugin[$key]['root'] . "/include.php";
                    $in_plugin = 1;
                } else {
                    require_once create_path("home.php");
                    $index['class_home'] = 'on';
                }
        }
    } else {
        require_once create_path("home.php");
        $index['class_home'] = 'on';
    }
    if (CLUB != 0) {
        if (isset($_GET['r']) and $_GET['r'] == $lang['general']['idurl_club'] and isset($_GET['v2']) and $_GET['v2'] == CLUB) {
            $index['class_information'] = 'on';
            $index['class_club'] = "";
        }
    }
}
/***************************/
/**********************/
/* Text elements   */
/**********************/
$index['L_realisation'] = $lang['general']['realisation'];
$index['L_confirmation'] = $lang['general']['confirmation_suppression'];