Migration SVN
18
web/.htaccess
Executable file
@@ -0,0 +1,18 @@
|
||||
RewriteEngine on
|
||||
AddDefaultcharset UTF-8
|
||||
|
||||
# Main page
|
||||
RewriteRule ^([a-z]+)\.xhtml$ $1.php [L]
|
||||
RewriteRule ^([a-z]+)-([a-z]+)\.xhtml$ $1.php?action=$2 [L]
|
||||
RewriteRule ^([a-z]+)-([a-z]+)-([0-9]+)\.xhtml$ $1.php?action=$2&id=$3 [L]
|
||||
|
||||
# Hosting / Admin
|
||||
RewriteRule ^hosting/([a-z]+)\.xhtml$ hosting/$1.php [L]
|
||||
RewriteRule ^hosting/([a-z]+)-([a-z0-9]+)\.xhtml$ hosting/$1.php?action=$2 [L]
|
||||
RewriteRule ^admin/([a-z]+)\.xhtml$ admin/$1.php [L]
|
||||
RewriteRule ^admin/([a-z]+)-([a-z]+)\.xhtml$ admin/$1.php?action=$2 [L]
|
||||
RewriteRule ^admin/([a-z]+)-([a-z]+)-([0-9]+)\.xhtml$ admin/$1.php?action=$2&id=$3 [L]
|
||||
|
||||
#Error page
|
||||
RewriteRule ^error-([0-9]{1,3})\.xhtml$ error.php?eid=$1 [L]
|
||||
|
||||
51
web/admin/support.php
Executable file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
require_once('../../system/configuration.php');
|
||||
require(PATH_SYSTEM.'core.php');
|
||||
try
|
||||
{
|
||||
// Check if user has the specified rights to access this section
|
||||
$_SESSION['user']->userCheckAccess(LEVEL_SUPPORT);
|
||||
|
||||
$action_is_valid=false;
|
||||
|
||||
$support = new support();
|
||||
|
||||
if ( isset($_GET['action']) ) {
|
||||
// If the user wants to see the details of a ticket
|
||||
if ( $_GET['action'] == 'show') {
|
||||
if ( !textVerification::verifID($_GET['id'])) throw new myException('Trying to see a ticket with an invalid id');
|
||||
$action_is_valid=true;
|
||||
$template_main = 'admin/support/show';
|
||||
$ticket_id=$_GET['id'];
|
||||
$details = $support->getTicketDetails($ticket_id);
|
||||
if (!is_null($details)) {
|
||||
$ticket = $details[0];
|
||||
$lang = new lang();
|
||||
$ticket->open_date = date($lang->userGetDateFormat().' '.$lang->userGetTimeFormat(), $ticket->open_date);
|
||||
$pages_count = $support->countTicketTotalPages( $_GET['id'] );
|
||||
$_SESSION['template']->getWords(array('pages_count' => $pages_count, 'user_actions_allowed' => true, 'ticket' => $ticket));
|
||||
} else throw new myException('Ticket not found or user not allowed to see it');
|
||||
}
|
||||
}
|
||||
|
||||
// if no valid action was specified (or recognized)
|
||||
if (!$action_is_valid) {
|
||||
$pages_count1 = $support->countWaitingTicketsTotalPages();
|
||||
$pages_count2 = $support->countRepliedTicketsTotalPages();
|
||||
$_SESSION['template']->getWords(array('pages_count1' => $pages_count1, 'pages_count2' => $pages_count2));
|
||||
$template_main = 'admin/support/list';
|
||||
}
|
||||
|
||||
// Load templates
|
||||
$_SESSION['template']->loadTemplate('_contentbegin');
|
||||
$_SESSION['template']->loadTemplate($template_main);
|
||||
$_SESSION['template']->loadTemplate('_contentend');
|
||||
$_SESSION['template']->getWords(array('sql' => $_SESSION['database']->executed_req));
|
||||
|
||||
// Parse templates
|
||||
$_SESSION['template']->parseTemplate();
|
||||
|
||||
} catch (myException $error) {
|
||||
$error->displayErrorMessage();
|
||||
}
|
||||
?>
|
||||
720
web/ajax.php
Executable file
@@ -0,0 +1,720 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @todo Write code for password modification form (actually, don't do anything)
|
||||
* @todo When textVerification::verifUnixPath will be modified (adding an optional param for directory existence verification),
|
||||
* modify code below to correspond to this modification (errors codes are ready in the form template)
|
||||
* @todo Add code to really add a new vhost in database (actually, only the $_POST vars check is done)
|
||||
* Need vhost class modifications (for optionnals customized php values)
|
||||
*/
|
||||
|
||||
require_once('../system/configuration.php');
|
||||
require(PATH_SYSTEM.'core.php');
|
||||
try
|
||||
{
|
||||
if ( !isset($_GET['frm_id']) ) throw new myException('The ID of action is not set');
|
||||
$ajax_id = $_GET['frm_id'];
|
||||
if ( !textVerification::verifAjaxID($ajax_id)) throw new myException('The syntax of ID is not correct.');
|
||||
switch ($ajax_id)
|
||||
{
|
||||
// Modify Data account
|
||||
case 'form_myaccount':
|
||||
$_SESSION['user']->userCheckAccess(1);
|
||||
$ret_code = array();
|
||||
$ret_code[]= 1;
|
||||
// Verify the inputs
|
||||
if ( !isset($_POST['req_first_name']) ) $ret_code[] = 'err_req_first_name_missing';
|
||||
if ( !textVerification::verifFirstName($_POST['req_first_name']) ) $ret_code[] = 'err_req_first_name';
|
||||
|
||||
if ( !isset($_POST['req_last_name']) ) $ret_code[] = 'err_req_last_name_missing';
|
||||
if ( !textVerification::verifLastName($_POST['req_last_name']) ) $ret_code[] = 'err_req_last_name';
|
||||
|
||||
if ( isset($_POST['company']) ) {
|
||||
if ( !textVerification::verifCompany($_POST['company']) ) $ret_code[] = 'err_company';
|
||||
} else $_POST['company']='';
|
||||
|
||||
if ( !isset($_POST['req_address']) ) $ret_code[] = 'err_req_address_missing';
|
||||
if ( !textVerification::verifAddress($_POST['req_address']) ) $ret_code[] = 'err_req_address';
|
||||
|
||||
if ( !isset($_POST['req_city']) ) $ret_code[] = 'err_req_city_missing';
|
||||
if ( !textVerification::verifLastName($_POST['req_city']) ) $ret_code[] = 'err_req_city';
|
||||
|
||||
if ( !isset($_POST['req_zipcode']) ) $ret_code[] = 'err_req_zipcode_missing';
|
||||
if ( !textVerification::verifZipcode($_POST['req_zipcode']) ) $ret_code[] = 'err_req_zipcode';
|
||||
|
||||
if ( !isset($_POST['req_email']) ) $ret_code[] = 'err_req_email_missing';
|
||||
if ( !textVerification::verifEmail($_POST['req_email']) ) $ret_code[] = 'err_req_email';
|
||||
|
||||
if ( !isset($_POST['req_pseudo']) ) $ret_code[] = 'err_req_pseudo_missing';
|
||||
if ( !textVerification::verifPseudo($_POST['req_pseudo']) ) $ret_code[] = 'err_req_pseudo';
|
||||
|
||||
// Verification of the syntax of countrie and lang
|
||||
if ( !isset($_POST['countrie']) or !textVerification::verifCountrieID($_POST['countrie']) )
|
||||
throw new myException('Countrie ID is not an int');
|
||||
if ( !isset($_POST['lang']) or !textVerification::verifLangID($_POST['lang']) )
|
||||
throw new myException('Lang ID is not an int');
|
||||
|
||||
// Verification of the syntaxe of template and existence
|
||||
if ( !isset($_POST['template']) or !textVerification::verifTemplate($_POST['template']) )
|
||||
throw new myException('Syntax of the template is incorrect');
|
||||
if ( !$_SESSION['template']->checkTemplateExistence($_POST['template']) )
|
||||
throw new myException('User want to use an inexistant template');
|
||||
|
||||
// Verification of the existence of the countrie and lang
|
||||
if ( !$_SESSION['user']->checkCountrieExistence($_POST['countrie']) ) throw new myException('The ID of countrie is not found in db');
|
||||
if ( !$_SESSION['user']->checkLangExistence($_POST['lang']) ) throw new myException('The ID of lang it not found or not lang');
|
||||
|
||||
// Verif the username
|
||||
if ( !$_SESSION['user']->checkUsernameExistence($_POST['req_pseudo'])
|
||||
and $_SESSION['user']->information_user->user != $_POST['req_pseudo'] )
|
||||
$ret_code[] = 'pseudo_used';
|
||||
|
||||
if ( count($ret_code) == 1) {
|
||||
//Verification of the actions of lang template
|
||||
$lang_info = $_SESSION['user']->getCountrieInformations($_POST['lang']);
|
||||
if ( (!TEMPLATE_USE_OTHERS) and ( $_SESSION['template']->userGetTemplate() != $_POST['template']) ) $ret_code[] = 'tpl_forbidden';
|
||||
if ( (!LANG_USE_OTHERS) and ( $lang_info->flag != $_SESSION['user']->information_user->lang) ) $ret_code[] = 'lang_forbidden';
|
||||
|
||||
$_SESSION['user']->userEdit(
|
||||
$_POST['req_first_name'],
|
||||
$_POST['req_last_name'],
|
||||
$_POST['company'],
|
||||
$_POST['req_address'],
|
||||
$_POST['req_city'],
|
||||
$_POST['req_zipcode'],
|
||||
$_POST['req_email'],
|
||||
$_POST['req_pseudo'],
|
||||
$_POST['countrie'],
|
||||
$_POST['lang'],
|
||||
$_POST['template']
|
||||
);
|
||||
$ret_code[] = 'account_is_ok';
|
||||
} else $ret_code[0]=0;
|
||||
echo json_encode($ret_code);
|
||||
break;
|
||||
|
||||
|
||||
case 'form_password':
|
||||
$ret_code = array();
|
||||
$ret_code[]= 1;
|
||||
|
||||
$ret_code[]='pwd_is_ok';
|
||||
echo json_encode($ret_code);
|
||||
break;
|
||||
|
||||
case 'form_new_ticket':
|
||||
$_SESSION['user']->userCheckAccess(LEVEL_REGISTER);
|
||||
$ret_code = array();
|
||||
$ret_code[]= 1;
|
||||
// Verify the inputs
|
||||
if ( !isset($_POST['hosting_id']) or !textVerification::verifHostingID($_POST['hosting_id']) ) $ret_code[] = 'err_hosting_id';
|
||||
if ( !isset($_POST['req_subject']) ) $ret_code[] = 'err_req_subject_missing';
|
||||
if ( !textVerification::verifSubject($_POST['req_subject']) ) $ret_code[] = 'err_req_subject';
|
||||
if ( !isset($_POST['req_message']) ) $ret_code[] = 'err_req_message_missing';
|
||||
if ( !textVerification::verifMessage($_POST['req_message']) ) $ret_code[] = 'err_req_message';
|
||||
// If no errors encountered, try to add the ticket in database
|
||||
if ( count($ret_code) == 1) {
|
||||
$support = new support();
|
||||
if ($support->userCreateTicket($_POST['req_subject'], $_POST['req_message'], ($_POST['hosting_id']==0?NULL:$_POST['hosting_id']))==false) {
|
||||
throw new myException('Error while creating a new ticket in database.');
|
||||
} else {
|
||||
$ret_code[]='all_is_ok';
|
||||
}
|
||||
} else $ret_code[0]=0;
|
||||
echo json_encode($ret_code);
|
||||
break;
|
||||
|
||||
case 'form_user_reply':
|
||||
$_SESSION['user']->userCheckAccess(LEVEL_REGISTER);
|
||||
$ret_code = array();
|
||||
$ret_code[]= 1;
|
||||
// Verify the inputs
|
||||
if ( !isset($_POST['req_message']) ) $ret_code[] = 'err_req_message_missing';
|
||||
if ( !textVerification::verifMessage($_POST['req_message']) ) $ret_code[] = 'err_req_message';
|
||||
if ( !isset($_POST['reply_ticket_id']) or !textVerification::verifID($_POST['reply_ticket_id']) ) {
|
||||
$ret_code[] = 'err_ticket_id';
|
||||
throw new myException('Error in user ticket response : ticket id was not valid !');
|
||||
}
|
||||
// If no errors encountered, try to add the message in database
|
||||
if ( count($ret_code) == 1 ) {
|
||||
$support = new support();
|
||||
if ( !$support->userAddResponse($_POST['reply_ticket_id'], $_POST['req_message'])) {
|
||||
throw new myException('Error while posting a new ticket reply in database.');
|
||||
} else {
|
||||
$ret_code[] = 'reply_is_ok';
|
||||
}
|
||||
} else $ret_code[0] = 0;
|
||||
echo json_encode($ret_code);
|
||||
break;
|
||||
|
||||
case 'form_user_close':
|
||||
$_SESSION['user']->userCheckAccess(LEVEL_REGISTER);
|
||||
$ret_code = array();
|
||||
$ret_code[]= 1;
|
||||
// Verify the inputs
|
||||
if ( !isset($_POST['close_ticket_id']) or !textVerification::verifID($_POST['close_ticket_id']) ) {
|
||||
$ret_code[] = 'err_ticket_id';
|
||||
throw new myException('Error in user close ticket form : ticket id was not valid !');
|
||||
}
|
||||
// If no errors encountered, try to close the message in database
|
||||
if ( count($ret_code) == 1 ) {
|
||||
$support = new support();
|
||||
if ( !$support->userCloseTicket($_POST['close_ticket_id'])) {
|
||||
throw new myException('Error while closing a ticket (from user) in database.');
|
||||
} else {
|
||||
$ret_code[] = 'close_ok';
|
||||
}
|
||||
} else $ret_code[0] = 0;
|
||||
echo json_encode($ret_code);
|
||||
break;
|
||||
|
||||
case 'form_admin_reply':
|
||||
$_SESSION['user']->userCheckAccess(LEVEL_SUPPORT);
|
||||
$ret_code = array();
|
||||
$ret_code[]= 1;
|
||||
// Verify the inputs
|
||||
if ( !isset($_POST['req_message']) ) $ret_code[] = 'err_req_message_missing';
|
||||
if ( !textVerification::verifMessage($_POST['req_message']) ) $ret_code[] = 'err_req_message';
|
||||
if ( !isset($_POST['reply_ticket_id']) or !textVerification::verifID($_POST['reply_ticket_id']) ) {
|
||||
$ret_code[] = 'err_ticket_id';
|
||||
throw new myException('Error in support response : ticket id was not valid !');
|
||||
}
|
||||
// If no errors encountered, try to add the message in database
|
||||
if ( count($ret_code) == 1 ) {
|
||||
$support = new support();
|
||||
if ( !$support->addResponse($_POST['reply_ticket_id'], $_POST['req_message'], false)) {
|
||||
throw new myException('Error while posting a new ticket reply in database.');
|
||||
} else {
|
||||
$ret_code[] = 'reply_is_ok';
|
||||
}
|
||||
} else $ret_code[0] = 0;
|
||||
echo json_encode($ret_code);
|
||||
break;
|
||||
|
||||
case 'form_admin_close':
|
||||
$_SESSION['user']->userCheckAccess(LEVEL_SUPPORT);
|
||||
$ret_code = array();
|
||||
$ret_code[]= 1;
|
||||
// Verify the inputs
|
||||
if ( !isset($_POST['close_ticket_id']) or !textVerification::verifID($_POST['close_ticket_id']) ) {
|
||||
$ret_code[] = 'err_ticket_id';
|
||||
throw new myException('Error in admin close ticket form : ticket id was not valid !');
|
||||
}
|
||||
// If no errors encountered, try to close the message in database
|
||||
if ( count($ret_code) == 1 ) {
|
||||
$support = new support();
|
||||
if ( !$support->closeTicket($_POST['close_ticket_id'], false)) {
|
||||
throw new myException('Error while closing a ticket (from support) in database.');
|
||||
} else {
|
||||
$ret_code[] = 'close_ok';
|
||||
}
|
||||
} else $ret_code[0] = 0;
|
||||
echo json_encode($ret_code);
|
||||
break;
|
||||
|
||||
case 'tbl_history': // Pagination for page 'History'
|
||||
$_SESSION['user']->userCheckAccess(LEVEL_REGISTER);
|
||||
// Verify the inputs
|
||||
if ( !isset($_GET['p']) || !textVerification::verifID($_GET['p']) || $_GET['p']<1) {
|
||||
throw new myException('Error in history page : number of page to show not valid !');
|
||||
}
|
||||
// Create the history class instance
|
||||
$history = new history();
|
||||
// Check page number
|
||||
$pages_count = $history->userCountTotalPages();
|
||||
if ( $_GET['p'] > $pages_count ) {
|
||||
throw new myException('Error in history page : number of page to show too big !');
|
||||
}
|
||||
// Get Page datas
|
||||
$start=($_GET['p']-1) * RECORD_BY_PAGE;
|
||||
$history_list = $history->userListHistory($start, RECORD_BY_PAGE);
|
||||
// Create a pagination class instance
|
||||
$paging = new pagination();
|
||||
foreach( $history_list as $key => $value )
|
||||
{
|
||||
$line_index = $paging->addLine();
|
||||
$paging->addCell( $value->date );
|
||||
$paging->addCell( $value->action );
|
||||
$paging->addCell( $value->hosting );
|
||||
$paging->addCell( $value->ip );
|
||||
}
|
||||
// Return result to js engine
|
||||
echo $paging->getResult();
|
||||
break;
|
||||
|
||||
case 'tbl_myhostings': // Pagination for page 'MyHostings'
|
||||
$_SESSION['user']->userCheckAccess(LEVEL_REGISTER);
|
||||
// Verify the inputs
|
||||
if ( !isset($_GET['p']) || !textVerification::verifID($_GET['p']) || $_GET['p']<1) {
|
||||
throw new myException('Error in myhostings page : number of page to show not valid !');
|
||||
}
|
||||
// Check page number
|
||||
$pages_count = $_SESSION['hosting']->userCountTotalPages();
|
||||
if ( $_GET['p'] > $pages_count ) {
|
||||
throw new myException('Error in myhostings page : number of page to show too big !');
|
||||
}
|
||||
// Get Page datas
|
||||
$start=($_GET['p']-1) * RECORD_BY_PAGE;
|
||||
$hostings = $_SESSION['hosting']->userListHostings( $start, RECORD_BY_PAGE);
|
||||
|
||||
$lang = new lang();
|
||||
$paging = new pagination();
|
||||
foreach ( $hostings as $key => $value )
|
||||
{
|
||||
$value->hosting_begin = date($lang->userGetDateFormat(), $value->start_date).' '.date($lang->userGetTimeFormat(), $value->start_date);
|
||||
$value->hosting_end = date($lang->userGetDateFormat(), $value->end_date).' '.date($lang->userGetTimeFormat(), $value->end_date);
|
||||
$value->full_name = $value->base_name . $lang->getWordFromLangFile('hosting_address');
|
||||
$value->statusText = ucfirst($lang->getWordFromLangFile( ($value->hosting_active == 'true' ? 'functional':'suspended')));
|
||||
|
||||
$line_index = $paging->addLine();
|
||||
$paging->addCell( html::makeHtmlForMyHostings( 0, $value) );
|
||||
$paging->addCell( $value->offer_name );
|
||||
$paging->addCell( $value->hosting_begin );
|
||||
$paging->addCell( $value->hosting_end );
|
||||
$paging->addCell( html::makeHtmlForMyHostings( 4, $value) );
|
||||
}
|
||||
echo $paging->getResult();
|
||||
break;
|
||||
|
||||
case 'tbl_user_tickets': // Pagination for page 'Support'
|
||||
$_SESSION['user']->userCheckAccess(LEVEL_REGISTER);
|
||||
// Verify the inputs
|
||||
if ( !isset($_GET['p']) || !textVerification::verifID($_GET['p']) || $_GET['p']<1) {
|
||||
throw new myException('Error in support page : number of page to show not valid !');
|
||||
}
|
||||
// Create the support class instance
|
||||
$support = new support();
|
||||
// Check page number
|
||||
$pages_count = $support->userCountTotalPages();
|
||||
if ( $_GET['p'] > $pages_count ) {
|
||||
throw new myException('Error in support page : number of page to show too big !');
|
||||
}
|
||||
// Get Page datas
|
||||
$start=($_GET['p']-1) * RECORD_BY_PAGE;
|
||||
$tickets_list = $support->userGetTickets($start, RECORD_BY_PAGE);
|
||||
// Create a pagination class instance
|
||||
$paging = new pagination();
|
||||
$lang = new lang();
|
||||
foreach( $tickets_list as $key => $value )
|
||||
{
|
||||
$value->label_text = date($lang->userGetDateFormat().' '.$lang->userGetTimeFormat(), $value->open_date);
|
||||
$paging->addLine();
|
||||
$paging->addCell( html::makeHtmlForSupport( 0, $value ) );
|
||||
$paging->addCell( $value->subject );
|
||||
$keyword = '';
|
||||
switch ( $value->status )
|
||||
{
|
||||
case 'asked':
|
||||
$keyword = 'ticket_status_asked';
|
||||
break;
|
||||
case 'replied':
|
||||
$keyword = 'ticket_status_replied';
|
||||
break;
|
||||
case 'closed_by_user':
|
||||
$keyword = 'ticket_status_closed_user';
|
||||
break;
|
||||
case 'closed_by_support':
|
||||
$keyword = 'ticket_status_closed_support';
|
||||
break;
|
||||
case 'auto_closed':
|
||||
$keyword = 'ticket_status_auto_closed';
|
||||
break;
|
||||
}
|
||||
$paging->addCell( $lang->getWordFromLangFile( $keyword ) );
|
||||
}
|
||||
// Return result to js engine
|
||||
echo $paging->getResult();
|
||||
break;
|
||||
|
||||
case 'tbl_admin_wtickets': // Pagination for page 'Admin/Support' (table "Waiting tickets")
|
||||
case 'tbl_admin_rtickets': // Pagination for page 'Admin/Support' (table "Replied tickets")
|
||||
$_SESSION['user']->userCheckAccess(LEVEL_SUPPORT);
|
||||
// Verify the inputs
|
||||
if ( !isset($_GET['p']) || !textVerification::verifID($_GET['p']) || $_GET['p']<1) {
|
||||
throw new myException('Error in admin/support page : number of page to show not valid !');
|
||||
}
|
||||
// Create the support class instance
|
||||
$support = new support();
|
||||
// Check page number
|
||||
if ( $ajax_id == 'tbl_admin_wtickets' ) {
|
||||
$pages_count = $support->countWaitingTicketsTotalPages();
|
||||
} else {
|
||||
$pages_count = $support->countRepliedTicketsTotalPages();
|
||||
}
|
||||
if ( $_GET['p'] > $pages_count ) {
|
||||
throw new myException('Error in admin/support page : number of page to show too big !');
|
||||
}
|
||||
// Get Page datas
|
||||
$start=($_GET['p']-1) * RECORD_BY_PAGE;
|
||||
if ( $ajax_id == 'tbl_admin_wtickets' ) {
|
||||
$tickets_list = $support->getWaitingTickets($start, RECORD_BY_PAGE);
|
||||
} else {
|
||||
$tickets_list = $support->getRepliedTickets($start, RECORD_BY_PAGE);
|
||||
}
|
||||
// Create a pagination class instance
|
||||
$paging = new pagination();
|
||||
$lang = new lang();
|
||||
foreach( $tickets_list as $key => $value )
|
||||
{
|
||||
$value->open_date = date($lang->userGetDateFormat().' '.$lang->userGetTimeFormat(), $value->open_date);
|
||||
$value->last_msg_date = date($lang->userGetDateFormat().' '.$lang->userGetTimeFormat(), $value->last_msg_date);
|
||||
$paging->addLine();
|
||||
$paging->addCell( html::makeHtmlForAdminSupport( 0, $value ) );
|
||||
$paging->addCell( $value->last_msg_date );
|
||||
$paging->addCell( $value->subject );
|
||||
}
|
||||
// Return result to js engine
|
||||
echo $paging->getResult();
|
||||
break;
|
||||
|
||||
case 'tbl_user_ticket_details': // Pagination for page 'Support - Ticket details'
|
||||
$_SESSION['user']->userCheckAccess(LEVEL_REGISTER);
|
||||
// Verify the inputs
|
||||
if ( !isset($_GET['p']) || !textVerification::verifID($_GET['p']) || $_GET['p']<1) {
|
||||
throw new myException('Error in ticket details page : number of page to show not valid !');
|
||||
}
|
||||
if ( !isset($_GET['value']) || !textVerification::verifID($_GET['value']) ) {
|
||||
throw new myException('Error in ticket details page : id of ticket not valid !');
|
||||
}
|
||||
// Create the support class instance
|
||||
$support = new support();
|
||||
// Check page number
|
||||
$pages_count = $support->countTicketTotalPages($_GET['value']);
|
||||
if ( $_GET['p'] > $pages_count ) {
|
||||
throw new myException('Error in ticket details page : number of page to show too big !');
|
||||
}
|
||||
// Get Page datas
|
||||
$start=($_GET['p']-1) * RECORD_BY_PAGE;
|
||||
$details = $support->getTicketDetails( $_GET['value'], $start, RECORD_BY_PAGE );
|
||||
// Remove Tickets informations
|
||||
unset($details[0]);
|
||||
if ( is_null($details) ) {
|
||||
throw new myException('Error in ticket details page : ticket id not allowed !');
|
||||
}
|
||||
// Create a pagination class instance
|
||||
$paging = new pagination();
|
||||
$lang = new lang();
|
||||
foreach( $details as $key => $value )
|
||||
{
|
||||
$paging->addLine();
|
||||
$value->msg_author = ( $value->is_reply=='true' ? $lang->getWordFromLangFile( 'ticket_msg_author_us' ) : $lang->getWordFromLangFile( 'ticket_msg_author_you' ) );
|
||||
$value->msg_date = date($lang->userGetDateFormat().' '.$lang->userGetTimeFormat(), $value->posted);
|
||||
$value->message=nl2br($value->message);
|
||||
$paging->addCell( html::makeHtmlForTicketDetails( 0, $value ) );
|
||||
$paging->addCell( $value->message );
|
||||
}
|
||||
// Return result to js engine
|
||||
echo $paging->getResult();
|
||||
break;
|
||||
|
||||
case 'tbl_admin_ticket_details': // Pagination for page 'Admin/Support - Ticket details'
|
||||
$_SESSION['user']->userCheckAccess(LEVEL_SUPPORT);
|
||||
// Verify the inputs
|
||||
if ( !isset($_GET['p']) || !textVerification::verifID($_GET['p']) || $_GET['p']<1) {
|
||||
throw new myException('Error in admin ticket details page : number of page to show not valid !');
|
||||
}
|
||||
if ( !isset($_GET['value']) || !textVerification::verifID($_GET['value']) ) {
|
||||
throw new myException('Error in admin ticket details page : id of ticket not valid !');
|
||||
}
|
||||
// Create the support class instance
|
||||
$support = new support();
|
||||
// Check page number
|
||||
$pages_count = $support->countTicketTotalPages($_GET['value']);
|
||||
if ( $_GET['p'] > $pages_count ) {
|
||||
throw new myException('Error in admin ticket details page : number of page to show too big !');
|
||||
}
|
||||
// Get Page datas
|
||||
$start=($_GET['p']-1) * RECORD_BY_PAGE;
|
||||
$details = $support->getTicketDetails( $_GET['value'], $start, RECORD_BY_PAGE );
|
||||
|
||||
$ticket_user_name = $details[0]->user_name;
|
||||
// Remove Ticket summary informations
|
||||
unset($details[0]);
|
||||
if ( is_null($details) ) {
|
||||
throw new myException('Error in admin ticket details page : ticket id not allowed !');
|
||||
}
|
||||
|
||||
// Create a pagination class instance
|
||||
$paging = new pagination();
|
||||
$lang = new lang();
|
||||
foreach( $details as $key => $value )
|
||||
{
|
||||
$paging->addLine();
|
||||
$value->msg_author = ( $value->is_reply=='true' ? $lang->getWordFromLangFile( 'ticket_msg_author_us' ) : $ticket_user_name );
|
||||
$value->msg_date = date($lang->userGetDateFormat().' '.$lang->userGetTimeFormat(), $value->posted);
|
||||
$value->message=nl2br($value->message);
|
||||
$paging->addCell( html::makeHtmlForTicketDetails( 0, $value ) );
|
||||
$paging->addCell( $value->message );
|
||||
}
|
||||
// Return result to js engine
|
||||
echo $paging->getResult();
|
||||
break;
|
||||
|
||||
case 'tbl_cron':
|
||||
$cron = new cron();
|
||||
$lang = new lang();
|
||||
$paging = new pagination();
|
||||
$_SESSION['user']->userCheckAccess(LEVEL_CUSTOMER);
|
||||
// Verify the inputs
|
||||
if ( !isset($_GET['p']) || !textVerification::verifID($_GET['p']) || $_GET['p']<1) {
|
||||
throw new myException('Error in myhostings page : number of page to show not valid !');
|
||||
}
|
||||
// Check page number
|
||||
$pages_count = $cron->userCountTotalPages();
|
||||
if ( $_GET['p'] > $pages_count ) {
|
||||
throw new myException('Error in myhostings page : number of page to show too big !');
|
||||
}
|
||||
// Get Page datas
|
||||
$start=($_GET['p']-1) * RECORD_BY_PAGE;
|
||||
$cronlist = $cron->userListCrons( $_SESSION['hosting']->information_hosting->id, $start, RECORD_BY_PAGE);
|
||||
foreach ($cronlist as $key => $value)
|
||||
{
|
||||
$value->current_page = $_GET['p'];
|
||||
$value->max_pages = $pages_count;
|
||||
$start_stop_title = ( $value->is_active == 'true' ? 'cron_stop_title':'cron_start_title');
|
||||
$value->start_stop_title = $lang->getWordFromLangFile($start_stop_title);
|
||||
$value->delete_title = $lang->getWordFromLangFile('cron_delete_title');
|
||||
$time_to_execute = $value->execute_every / 60;
|
||||
$unit = $lang->getWordFromLangFile('minutes');
|
||||
if ( $time_to_execute > 60 ) {
|
||||
$time_to_execute = $time_to_execute / 60;
|
||||
$unit = $lang->getWordFromLangFile('hours');
|
||||
}
|
||||
$paging->addLine();
|
||||
$paging->addCell( html::makeHtmlForCron(1, $value->address) );
|
||||
$paging->addCell( date($lang->userGetTimeFormat().' '.$lang->userGetDateFormat(), $value->executed_at) );
|
||||
$paging->addCell( round($time_to_execute, 0).' '.$unit);
|
||||
$paging->addCell( html::makeHtmlForCron(0, $value));
|
||||
$paging->setCellAttribute( $paging->getLinesCount() -1, 0, 'title', htmlentities($value->address) );
|
||||
}
|
||||
echo $paging->getResult();
|
||||
break;
|
||||
|
||||
case 'form_new_cron':
|
||||
$_SESSION['user']->userCheckAccess(LEVEL_REGISTER);
|
||||
$ret_code = array();
|
||||
$ret_code[]= 1;
|
||||
// Check the task's url
|
||||
if ( !isset($_POST['req_url']) ) $ret_code[] = 'req_url_missing';
|
||||
if ( !textVerification::verifUrl($_POST['req_url']) ) $ret_code[] = 'err_req_url';
|
||||
// Check the activation value
|
||||
if ( !textVerification::verifBoolean($_POST['active']) ) {
|
||||
throw new myException('Error in from new cron : boolean for task activation not valid !');
|
||||
}
|
||||
// Check and convert the task's execution frequency
|
||||
if ( !isset($_POST['req_frequency']) ) $ret_code[] = 'err_req_frequency_missing';
|
||||
if ( !textVerification::verifInteger($_POST['req_frequency']) ) $ret_code[] = 'err_req_frequency';
|
||||
|
||||
if ( !textVerification::verifInteger($_POST['freq_unit'], 0, 3 ) ) {
|
||||
throw new myException('Error in from new cron : frequency unit index not valid !');
|
||||
}
|
||||
$freq = $_POST['req_frequency'] * 60; // Minutes
|
||||
$freq *= ($_POST['freq_unit']=='1' ? 60:1); // Hours
|
||||
$freq *= ($_POST['freq_unit']=='2' ? 1440:1); // Days
|
||||
$freq *= ($_POST['freq_unit']=='3' ? 10080:1); // Weeks
|
||||
|
||||
if ( $freq < CRON_MIN_TIME ) $ret_code[] = 'err_freq_too_small';
|
||||
|
||||
// Check and convert the task's first start
|
||||
if ( !isset($_POST['first_start']) ) {
|
||||
$_POST['first_start']=0;
|
||||
}
|
||||
if ( !textVerification::verifInteger($_POST['first_start']) ) $ret_code[] = 'err_first_start';
|
||||
|
||||
if ( !textVerification::verifInteger($_POST['first_start_unit'], 0, 3 ) ) {
|
||||
throw new myException('Error in from new cron : first start unit index not valid !');
|
||||
}
|
||||
$first_start = $_POST['first_start'] * 60;
|
||||
$first_start *= ($_POST['first_start_unit']=='1' ? 60:1); // Hours
|
||||
$first_start *= ($_POST['first_start_unit']=='2' ? 1440:1); // Days
|
||||
$first_start *= ($_POST['first_start_unit']=='3' ? 10080:1); // Weeks
|
||||
$first_start += strtotime('now');
|
||||
|
||||
// If no errors encountered at verification time, try to add the task in database
|
||||
if ( count($ret_code) == 1) {
|
||||
$cron = new cron();
|
||||
$result= $cron->userAddCron($_POST['req_url'], $freq, $first_start, $_POST['active']);
|
||||
switch($result)
|
||||
{
|
||||
case 0: // Script not reacheable
|
||||
$ret_code[] = 'err_not_reacheable';
|
||||
$ret_code[0]=0;
|
||||
break;
|
||||
case 1: // Cron task added successfully
|
||||
$ret_code[] = 'all_is_ok';
|
||||
break;
|
||||
case 2: // Limit of cronjob reached
|
||||
$ret_code[] = 'err_max_cronjobs_reached';
|
||||
break;
|
||||
}
|
||||
} else $ret_code[0]=0;
|
||||
echo json_encode($ret_code);
|
||||
break;
|
||||
|
||||
case 'cronStopTask':
|
||||
case 'cronStartTask':
|
||||
$_SESSION['user']->userCheckAccess(LEVEL_REGISTER);
|
||||
// Verify the inputs
|
||||
if ( !isset($_POST['value']) || !textVerification::verifID($_POST['value']) ) {
|
||||
throw new myException('Error in '.$ajax_id.' : id of the task not valid !');
|
||||
}
|
||||
$cron = new cron();
|
||||
if ( $ajax_id == 'cronStopTask' ) {
|
||||
$res=$cron->userDeactiveCron($_POST['value']);
|
||||
} else {
|
||||
$res=$cron->userActiveCron($_POST['value']);
|
||||
}
|
||||
if ( $res != 1 ) {
|
||||
throw new myException('Error in '.$ajax_id.' : action returned '.$res);
|
||||
}
|
||||
echo json_encode(array('1'));
|
||||
break;
|
||||
|
||||
case 'cronDeleteTask':
|
||||
$_SESSION['user']->userCheckAccess(LEVEL_REGISTER);
|
||||
// Verify the inputs
|
||||
if ( !isset($_POST['value']) || !textVerification::verifID($_POST['value']) ) {
|
||||
throw new myException('Error in cronDeleteTask : id of the task not valid !');
|
||||
}
|
||||
$cron = new cron();
|
||||
if ( $cron->userDeleteCron( $_POST['value'] ) === true )
|
||||
$res=1;
|
||||
else
|
||||
$res=0;
|
||||
echo json_encode(array($res));
|
||||
break;
|
||||
|
||||
case 'form_new_vhost':
|
||||
$_SESSION['user']->userCheckAccess(LEVEL_REGISTER);
|
||||
$ret_code = array();
|
||||
$ret_code[]= 1;
|
||||
// Verify the inputs
|
||||
if ( !isset($_POST['req_host']) ) $ret_code[] = 'err_req_host_missing';
|
||||
if ( !textVerification::verifHost($_POST['req_host']) ) $ret_code[] = 'err_req_host';
|
||||
if ( !isset($_POST['req_usrfldr_root']) ) $ret_code[] = 'err_req_usrfldr_root_missing';
|
||||
if ( !textVerification::verifUnixPath($_POST['req_usrfldr_root']) ) $ret_code[] = 'err_req_usrfldr_root';
|
||||
if ( !textVerification::verifBoolean($_POST['active']) ) {
|
||||
throw new myException('Error in from new vhost : boolean for activation is not valid !');
|
||||
}
|
||||
|
||||
if ( strlen( $_POST['email']) )
|
||||
{
|
||||
if ( !textVerification::verifEmail($_POST['email']) ) $ret_code[] = 'err_email';
|
||||
} else $_POST['email'] = NULL;
|
||||
|
||||
$php_values = array();
|
||||
|
||||
if ( strlen( $_POST['usrfldr_openbasedir']) )
|
||||
{
|
||||
if ( !textVerification::verifUnixPath($_POST['usrfldr_openbasedir']) ) $ret_code[] = 'err_usrfldr_openbasedir';
|
||||
} else {
|
||||
$_POST['usrfldr_openbasedir'] = $_POST['req_usrfldr_root'];
|
||||
}
|
||||
$php_values['open_basedir'] = $_POST['usrfldr_openbasedir'];
|
||||
|
||||
if ( strlen( $_POST['sql_def_host']) )
|
||||
{
|
||||
if ( !textVerification::verifHost($_POST['sql_def_host']) )
|
||||
$ret_code[] = 'err_sql_def_host';
|
||||
else
|
||||
$php_values['sql_default_host'] = $_POST['sql_def_host'];
|
||||
}
|
||||
|
||||
if ( strlen( $_POST['sql_def_user']) )
|
||||
{
|
||||
if ( !textVerification::verifPseudo($_POST['sql_def_user']) )
|
||||
$ret_code[] = 'err_sql_def_user';
|
||||
else
|
||||
$php_values['sql_default_user'] = $_POST['sql_def_user'];
|
||||
}
|
||||
|
||||
if ( strlen( $_POST['sql_def_pwd']) )
|
||||
{
|
||||
if ( !textVerification::verifPassword($_POST['sql_def_pwd']) )
|
||||
$ret_code[] = 'err_sql_def_pwd';
|
||||
else
|
||||
$php_values['sql_default_pwd'] = $_POST['sql_def_pwd'];
|
||||
}
|
||||
|
||||
if ( strlen( $_POST['tmp_usrfldr']) )
|
||||
{
|
||||
if ( !textVerification::verifUnixPath($_POST['tmp_usrfldr']) )
|
||||
$ret_code[] = 'tmp_usrfldr';
|
||||
else
|
||||
$php_values['temp_folder'] = $_POST['tmp_usrfldr'];
|
||||
|
||||
}
|
||||
|
||||
if ( strlen( $_POST['sess_usrfldr']) )
|
||||
{
|
||||
if ( !textVerification::verifUnixPath($_POST['sess_usrfldr']) )
|
||||
$ret_code[] = 'sess_usrfldr';
|
||||
else
|
||||
$php_values['sessions_folder'] = $_POST['sess_usrfldr'];
|
||||
}
|
||||
|
||||
// Check all optional boolean values
|
||||
foreach ( array('allowindexes','allow_url_fopen','allow_url_include','display_errors','short_open_tag','session_autostart','magic_quotes','register_globals') as $key)
|
||||
{
|
||||
if ( !textVerification::verifBoolean($_POST[$key]) ) {
|
||||
throw new myException('Error in from new vhost : boolean "'.$key.'" is not valid !');
|
||||
} else {
|
||||
$php_values[$key] = $_POST[$key];
|
||||
}
|
||||
}
|
||||
|
||||
// If no errors encountered at verification time, try to add the vhost in database
|
||||
if ( count($ret_code) == 1) {
|
||||
$vhost = new vhost();
|
||||
$res = $vhost->userAddVhost( $_POST['req_host'], $_POST['req_usrfldr_root'], $_POST['active'], $_POST['email'], $php_values );
|
||||
if ( true === $res) {
|
||||
$ret_code[] = 'all_is_ok';
|
||||
} else {
|
||||
$ret_code[0]=0;
|
||||
if ( $res == -1 )
|
||||
$ret_code[] = 'err_vhosts_max_reached';
|
||||
else
|
||||
$ret_code[] = 'err_host_exists';
|
||||
}
|
||||
} else $ret_code[0]=0;
|
||||
echo json_encode($ret_code);
|
||||
break;
|
||||
|
||||
case 'tbl_vhost':
|
||||
$vhost = new vhost();
|
||||
$lang = new lang();
|
||||
$paging = new pagination();
|
||||
$_SESSION['user']->userCheckAccess(LEVEL_CUSTOMER);
|
||||
// Verify the inputs
|
||||
if ( !isset($_GET['p']) || !textVerification::verifID($_GET['p']) || $_GET['p']<1) {
|
||||
throw new myException('Error in vhosts list page : number of page to show not valid !');
|
||||
}
|
||||
// Check page number
|
||||
$pages_count = $vhost->userCountTotalPages();
|
||||
if ( $_GET['p'] > $pages_count ) {
|
||||
throw new myException('Error in vhosts list page : number of page to show too big !');
|
||||
}
|
||||
// Get Page datas
|
||||
$start=($_GET['p']-1) * RECORD_BY_PAGE;
|
||||
$vhost_list = $vhost->userListVHosts( $_SESSION['hosting']->information_hosting->id, $start, RECORD_BY_PAGE);
|
||||
foreach ($vhost_list as $key => $value)
|
||||
{
|
||||
$value->current_page = $_GET['p'];
|
||||
$value->max_pages = $pages_count;
|
||||
$active_state = ( $value->is_active == 'true' ? '_yes':'_no');
|
||||
$value->active_state = $lang->getWordFromLangFile($active_state);
|
||||
|
||||
$paging->addLine();
|
||||
$paging->addCell( $value->host );
|
||||
$paging->addCell( $value->doc_root );
|
||||
$paging->addCell( $value->server_admin );
|
||||
$paging->addCell( $value->active_state);
|
||||
}
|
||||
echo $paging->getResult();
|
||||
break;
|
||||
|
||||
}
|
||||
} catch (myException $error) {
|
||||
$error->displayCriticalError();
|
||||
}
|
||||
?>
|
||||
10
web/critical_error.html
Executable file
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Warning - Critical error</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Critical error</h1>
|
||||
<p>The application has generated an error and can't continue.<br />
|
||||
Our team was informed.</p>
|
||||
</body>
|
||||
</html>
|
||||
13
web/error.php
Executable file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
|
||||
// Manage and display error :
|
||||
|
||||
# Error 1 : The lvl of the user is too small for access to this page
|
||||
# Error 2 : The lvl of the user is too big for access to this page
|
||||
# Error 3 : The user is not active in DB
|
||||
# Error 4 : The group of user is not active in DB
|
||||
# Error 5 : Hosting is deactivated
|
||||
# Error 6 : One or more of hosting server for specified hosting is deactivated. join support
|
||||
# Error 404 : File not found
|
||||
?>
|
||||
30
web/history.php
Executable file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
require_once('../system/configuration.php');
|
||||
require(PATH_SYSTEM.'core.php');
|
||||
try
|
||||
{
|
||||
|
||||
$_SESSION['user']->userCheckAccess(LEVEL_CUSTOMER);
|
||||
//$_SESSION['template']->loadCSS(array('history.css'));
|
||||
//$_SESSION['template']->loadJS(array('history.js'));
|
||||
|
||||
$history = new history();
|
||||
|
||||
// add history action (TEST)
|
||||
//$history->add("history_action_password", $_SESSION['user']->information_user->userid);
|
||||
|
||||
// Get history pages count
|
||||
$pages_count = $history->userCountTotalPages();
|
||||
|
||||
$_SESSION['template']->getWords(array('pages_count' => $pages_count));
|
||||
|
||||
// Template
|
||||
$_SESSION['template']->loadTemplate('_contentbegin');
|
||||
$_SESSION['template']->loadTemplate('history');
|
||||
$_SESSION['template']->loadTemplate('_contentend');
|
||||
$_SESSION['template']->getWords(array('sql' => $_SESSION['database']->executed_req));
|
||||
$_SESSION['template']->parseTemplate();
|
||||
} catch (myException $error) {
|
||||
$error->displayErrorMessage();
|
||||
}
|
||||
?>
|
||||
42
web/hosting/crons.php
Executable file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
require_once('../../system/configuration.php');
|
||||
require(PATH_SYSTEM.'core.php');
|
||||
try
|
||||
{
|
||||
$cron = new cron();
|
||||
|
||||
$_SESSION['user']->userCheckAccess(LEVEL_CUSTOMER);
|
||||
$_SESSION['hosting']->userCheckAccess();
|
||||
|
||||
|
||||
if ( $_SESSION['hosting']->information_hosting->offer_crons_number == 0 ) $base_tpl = 'error/not_in_offer';
|
||||
else {
|
||||
|
||||
// Crons specific menu
|
||||
$crons_menu = array();
|
||||
$crons_menu['hosting/crons.xhtml'] = 'mnu_list_crons';
|
||||
$crons_menu['hosting/crons-add.xhtml'] = "mnu_add_cron";
|
||||
$_SESSION['template']->addMenu('crons', $crons_menu);
|
||||
|
||||
if ( isset($_GET['action']) and $_GET['action'] == 'add') {
|
||||
$base_tpl = 'hosting/crons/add';
|
||||
$_SESSION['template']->getWords(array('CRON_MIN_TIME' => CRON_MIN_TIME));
|
||||
} else {
|
||||
$base_tpl = 'hosting/crons/list';
|
||||
$pages_count = $cron->userCountTotalPages();
|
||||
$_SESSION['template']->getWords(array('pages_count' => $pages_count));
|
||||
} // End of listing
|
||||
|
||||
}
|
||||
|
||||
// Template
|
||||
$_SESSION['template']->loadCSS(array('crons.css'));
|
||||
$_SESSION['template']->loadTemplate('_contentbegin');
|
||||
$_SESSION['template']->loadTemplate($base_tpl);
|
||||
$_SESSION['template']->loadTemplate('_contentend');
|
||||
$_SESSION['template']->getWords(array('sql' => $_SESSION['database']->executed_req));
|
||||
$_SESSION['template']->parseTemplate();
|
||||
} catch (myException $error) {
|
||||
$error->displayErrorMessage();
|
||||
}
|
||||
?>
|
||||
36
web/hosting/domainnames.php
Executable file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
require_once('../../system/configuration.php');
|
||||
require(PATH_SYSTEM.'core.php');
|
||||
try
|
||||
{
|
||||
$vhost = new vhost();
|
||||
|
||||
$_SESSION['user']->userCheckAccess(LEVEL_CUSTOMER);
|
||||
$_SESSION['hosting']->userCheckAccess();
|
||||
|
||||
$_SESSION['template']->loadJS('vhosts.js');
|
||||
|
||||
if ( $_SESSION['hosting']->information_hosting->offer_virtualhosts_number == 0 ) $base_tpl = 'error/not_in_offer';
|
||||
else {
|
||||
// VHosts specific menu
|
||||
$vhosts_menu = array();
|
||||
$vhosts_menu['hosting/domainnames.xhtml'] = 'mnu_list_vhosts';
|
||||
$vhosts_menu['hosting/domainnames-add.xhtml'] = "mnu_add_vhost";
|
||||
$_SESSION['template']->addMenu('vhosts', $vhosts_menu);
|
||||
|
||||
if ( isset($_GET['action']) and $_GET['action'] == 'add') {
|
||||
$base_tpl = 'hosting/vhosts/add';
|
||||
} else {
|
||||
$base_tpl = 'hosting/vhosts/list';
|
||||
$pages_count = $vhost->userCountTotalPages();
|
||||
$_SESSION['template']->getWords(array('pages_count' => $pages_count));
|
||||
}
|
||||
}
|
||||
$_SESSION['template']->loadTemplate('_contentbegin');
|
||||
$_SESSION['template']->loadTemplate($base_tpl);
|
||||
$_SESSION['template']->loadTemplate('_contentend');
|
||||
$_SESSION['template']->getWords(array('sql' => $_SESSION['database']->executed_req));
|
||||
$_SESSION['template']->parseTemplate();
|
||||
} catch (myException $error) {
|
||||
$error->displayErrorMessage();
|
||||
}
|
||||
33
web/hosting/hosting.php
Executable file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
require_once('../../system/configuration.php');
|
||||
require(PATH_SYSTEM.'core.php');
|
||||
try
|
||||
{
|
||||
|
||||
$_SESSION['user']->userCheckAccess(LEVEL_CUSTOMER);
|
||||
|
||||
// Initialize the hosting
|
||||
if ( isset($_GET['action']) and textVerification::verifHostingID($_GET['action']) ) {
|
||||
$_SESSION['hosting']->userSetCurrentHosting($_GET['action']);
|
||||
$_SESSION['hosting']->userInitializeHosting();
|
||||
} else redirect('myhostings.xhtml');
|
||||
|
||||
// Check autorization for the specified hosting
|
||||
$_SESSION['hosting']->userCheckAccess();
|
||||
|
||||
// Re-initialize the sidebar
|
||||
$_SESSION['template']->userSetRightsDisplay();
|
||||
|
||||
// Load CSS
|
||||
$_SESSION['template']->loadCSS(array('hosting.css'));
|
||||
|
||||
// Template
|
||||
$_SESSION['template']->loadTemplate('_contentbegin');
|
||||
$_SESSION['template']->loadTemplate('hosting/hosting');
|
||||
$_SESSION['template']->loadTemplate('_contentend');
|
||||
$_SESSION['template']->getWords(array('sql' => $_SESSION['database']->executed_req));
|
||||
$_SESSION['template']->parseTemplate();
|
||||
} catch (myException $error) {
|
||||
$error->displayErrorMessage();
|
||||
}
|
||||
?>
|
||||
24
web/hosting/informations.php
Executable file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
require_once('../../system/configuration.php');
|
||||
require(PATH_SYSTEM.'core.php');
|
||||
try
|
||||
{
|
||||
|
||||
$_SESSION['user']->userCheckAccess(LEVEL_CUSTOMER);
|
||||
$_SESSION['hosting']->userCheckAccess();
|
||||
|
||||
|
||||
|
||||
// Load CSS
|
||||
$_SESSION['template']->loadCSS(array('informations.css'));
|
||||
|
||||
// Template
|
||||
$_SESSION['template']->loadTemplate('_contentbegin');
|
||||
$_SESSION['template']->loadTemplate('hosting/informations');
|
||||
$_SESSION['template']->loadTemplate('_contentend');
|
||||
$_SESSION['template']->getWords(array('sql' => $_SESSION['database']->executed_req));
|
||||
$_SESSION['template']->parseTemplate();
|
||||
} catch (myException $error) {
|
||||
$error->displayErrorMessage();
|
||||
}
|
||||
?>
|
||||
BIN
web/image/big-icon/computer.png
Executable file
|
After Width: | Height: | Size: 12 KiB |
BIN
web/image/big-icon/computer_128.png
Executable file
|
After Width: | Height: | Size: 21 KiB |
BIN
web/image/big-icon/configuration.png
Executable file
|
After Width: | Height: | Size: 8.1 KiB |
BIN
web/image/big-icon/cron.png
Executable file
|
After Width: | Height: | Size: 9.3 KiB |
BIN
web/image/big-icon/database.png
Executable file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
web/image/big-icon/dns.png
Executable file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
web/image/big-icon/domain_name.png
Executable file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
web/image/big-icon/email.png
Executable file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
web/image/big-icon/faq.png
Executable file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
web/image/big-icon/ftp.png
Executable file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
web/image/big-icon/information.png
Executable file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
web/image/big-icon/installation.png
Executable file
|
After Width: | Height: | Size: 6.7 KiB |
BIN
web/image/big-icon/quota.png
Executable file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
web/image/big-icon/stop.png
Executable file
|
After Width: | Height: | Size: 7.0 KiB |
BIN
web/image/flag/ad.png
Executable file
|
After Width: | Height: | Size: 643 B |
BIN
web/image/flag/ae.png
Executable file
|
After Width: | Height: | Size: 408 B |
BIN
web/image/flag/af.png
Executable file
|
After Width: | Height: | Size: 604 B |
BIN
web/image/flag/ag.png
Executable file
|
After Width: | Height: | Size: 591 B |
BIN
web/image/flag/ai.png
Executable file
|
After Width: | Height: | Size: 643 B |
BIN
web/image/flag/al.png
Executable file
|
After Width: | Height: | Size: 600 B |
BIN
web/image/flag/am.png
Executable file
|
After Width: | Height: | Size: 497 B |
BIN
web/image/flag/an.png
Executable file
|
After Width: | Height: | Size: 488 B |
BIN
web/image/flag/ao.png
Executable file
|
After Width: | Height: | Size: 428 B |
BIN
web/image/flag/ar.png
Executable file
|
After Width: | Height: | Size: 506 B |
BIN
web/image/flag/as.png
Executable file
|
After Width: | Height: | Size: 647 B |
BIN
web/image/flag/at.png
Executable file
|
After Width: | Height: | Size: 403 B |
BIN
web/image/flag/au.png
Executable file
|
After Width: | Height: | Size: 673 B |
BIN
web/image/flag/aw.png
Executable file
|
After Width: | Height: | Size: 524 B |
BIN
web/image/flag/ax.png
Executable file
|
After Width: | Height: | Size: 663 B |
BIN
web/image/flag/az.png
Executable file
|
After Width: | Height: | Size: 589 B |
BIN
web/image/flag/ba.png
Executable file
|
After Width: | Height: | Size: 593 B |
BIN
web/image/flag/bb.png
Executable file
|
After Width: | Height: | Size: 585 B |
BIN
web/image/flag/bd.png
Executable file
|
After Width: | Height: | Size: 504 B |
BIN
web/image/flag/be.png
Executable file
|
After Width: | Height: | Size: 449 B |
BIN
web/image/flag/bf.png
Executable file
|
After Width: | Height: | Size: 497 B |
BIN
web/image/flag/bg.png
Executable file
|
After Width: | Height: | Size: 462 B |
BIN
web/image/flag/bh.png
Executable file
|
After Width: | Height: | Size: 457 B |
BIN
web/image/flag/bi.png
Executable file
|
After Width: | Height: | Size: 675 B |
BIN
web/image/flag/bj.png
Executable file
|
After Width: | Height: | Size: 486 B |
BIN
web/image/flag/bm.png
Executable file
|
After Width: | Height: | Size: 611 B |
BIN
web/image/flag/bn.png
Executable file
|
After Width: | Height: | Size: 639 B |
BIN
web/image/flag/bo.png
Executable file
|
After Width: | Height: | Size: 500 B |
BIN
web/image/flag/br.png
Executable file
|
After Width: | Height: | Size: 593 B |
BIN
web/image/flag/bs.png
Executable file
|
After Width: | Height: | Size: 526 B |
BIN
web/image/flag/bt.png
Executable file
|
After Width: | Height: | Size: 631 B |
BIN
web/image/flag/bv.png
Executable file
|
After Width: | Height: | Size: 512 B |
BIN
web/image/flag/bw.png
Executable file
|
After Width: | Height: | Size: 443 B |
BIN
web/image/flag/by.png
Executable file
|
After Width: | Height: | Size: 514 B |
BIN
web/image/flag/bz.png
Executable file
|
After Width: | Height: | Size: 600 B |
BIN
web/image/flag/ca.png
Executable file
|
After Width: | Height: | Size: 628 B |
BIN
web/image/flag/catalonia.png
Executable file
|
After Width: | Height: | Size: 398 B |
BIN
web/image/flag/cc.png
Executable file
|
After Width: | Height: | Size: 625 B |
BIN
web/image/flag/cd.png
Executable file
|
After Width: | Height: | Size: 528 B |
BIN
web/image/flag/cf.png
Executable file
|
After Width: | Height: | Size: 614 B |
BIN
web/image/flag/cg.png
Executable file
|
After Width: | Height: | Size: 521 B |
BIN
web/image/flag/ch.png
Executable file
|
After Width: | Height: | Size: 367 B |
BIN
web/image/flag/ci.png
Executable file
|
After Width: | Height: | Size: 453 B |
BIN
web/image/flag/ck.png
Executable file
|
After Width: | Height: | Size: 586 B |
BIN
web/image/flag/cl.png
Executable file
|
After Width: | Height: | Size: 450 B |
BIN
web/image/flag/cm.png
Executable file
|
After Width: | Height: | Size: 525 B |
BIN
web/image/flag/cn.png
Executable file
|
After Width: | Height: | Size: 472 B |
BIN
web/image/flag/co.png
Executable file
|
After Width: | Height: | Size: 483 B |
BIN
web/image/flag/cr.png
Executable file
|
After Width: | Height: | Size: 477 B |
BIN
web/image/flag/cs.png
Executable file
|
After Width: | Height: | Size: 439 B |
BIN
web/image/flag/cu.png
Executable file
|
After Width: | Height: | Size: 563 B |
BIN
web/image/flag/cv.png
Executable file
|
After Width: | Height: | Size: 529 B |
BIN
web/image/flag/cx.png
Executable file
|
After Width: | Height: | Size: 608 B |
BIN
web/image/flag/cy.png
Executable file
|
After Width: | Height: | Size: 428 B |
BIN
web/image/flag/cz.png
Executable file
|
After Width: | Height: | Size: 476 B |
BIN
web/image/flag/de.png
Executable file
|
After Width: | Height: | Size: 545 B |
BIN
web/image/flag/dj.png
Executable file
|
After Width: | Height: | Size: 572 B |
BIN
web/image/flag/dk.png
Executable file
|
After Width: | Height: | Size: 495 B |
BIN
web/image/flag/dm.png
Executable file
|
After Width: | Height: | Size: 620 B |
BIN
web/image/flag/do.png
Executable file
|
After Width: | Height: | Size: 508 B |
BIN
web/image/flag/dz.png
Executable file
|
After Width: | Height: | Size: 582 B |
BIN
web/image/flag/ec.png
Executable file
|
After Width: | Height: | Size: 500 B |
BIN
web/image/flag/ee.png
Executable file
|
After Width: | Height: | Size: 429 B |
BIN
web/image/flag/eg.png
Executable file
|
After Width: | Height: | Size: 465 B |
BIN
web/image/flag/eh.png
Executable file
|
After Width: | Height: | Size: 508 B |
BIN
web/image/flag/england.png
Executable file
|
After Width: | Height: | Size: 496 B |
BIN
web/image/flag/er.png
Executable file
|
After Width: | Height: | Size: 653 B |
BIN
web/image/flag/es.png
Executable file
|
After Width: | Height: | Size: 469 B |
BIN
web/image/flag/et.png
Executable file
|
After Width: | Height: | Size: 592 B |
BIN
web/image/flag/europeanunion.png
Executable file
|
After Width: | Height: | Size: 479 B |
BIN
web/image/flag/fam.png
Executable file
|
After Width: | Height: | Size: 532 B |
BIN
web/image/flag/fi.png
Executable file
|
After Width: | Height: | Size: 489 B |
BIN
web/image/flag/fj.png
Executable file
|
After Width: | Height: | Size: 610 B |
BIN
web/image/flag/fk.png
Executable file
|
After Width: | Height: | Size: 648 B |
BIN
web/image/flag/fm.png
Executable file
|
After Width: | Height: | Size: 552 B |
BIN
web/image/flag/fo.png
Executable file
|
After Width: | Height: | Size: 474 B |