Exemplo n.º 1
0
					<!-- END: CONTENTS -->

					<!-- SCRIPT -->
<?php 
/**
 * Generate AngularJS Code
 *
 * @param 	String 	$task
 * @param 	String 	$schema
 * @param 	String 	$form
 * @param 	String 	$model
 * @param 	String 	$redirect
 */
// Schema Definition
$schema = "\n{\n\ttype: 'object',\n\tproperties: {\n\t\tusername: {\n\t\t\ttitle: '" . T_('Username') . "',\n\t\t\ttype: 'string'\n\t\t},\n\t\temail: {\n\t\t\ttitle: '" . T_('Email') . "',\n\t\t\ttype: 'string'\n\t\t}\n\t},\n\t'required': [\n\t\t'username',\n\t\t'email'\n\t]\n}";
// Form Definition
$form = "\n[\n\t{\n\t\t'key': 'username',\n\t\t'type': 'text',\n\t\tfieldAddonLeft: '<span class=\"glyphicon glyphicon-user\"></span>',\n\t\tplaceholder: '" . T_('Login') . "'\n\t},\n\t{\n\t\t'key': 'email',\n\t\t'type': 'email',\n\t\tfieldAddonLeft: '<span class=\"glyphicon glyphicon-envelope\"></span>',\n\t\tplaceholder: '" . T_('Email') . "'\n\t}\n]";
$model = json_encode(array(), JSON_FORCE_OBJECT);
$js->getAngularCode('sendNewPassword', $schema, $form, $model, './login');
?>
					<!-- END: SCRIPT -->

<?php 
//------------------------------------------------------------------------------------------------------------+
/**
 * END: PAGE BODY
 */
/**
 * Build Page Footer
 */
$gui->getFooter();
Exemplo n.º 2
0
					<!-- SCRIPT -->
<?php 
/**
 * Generate AngularJS Code
 *
 * @param 	String 	$task
 * @param 	String 	$schema
 * @param 	String 	$form
 * @param 	String 	$model
 * @param 	String 	$redirect
 */
// Schema Definition
$schema = "\n{\n\ttype: 'object',\n\tproperties: {\n\t\tusername: {\n\t\t\ttitle: '" . T_('Login') . "',\n\t\t\ttype: 'string'\n\t\t},\n\t\tpassword0: {\n\t\t\ttitle: '" . T_('Password') . "',\n\t\t\ttype: 'string'\n\t\t},\n\t\tpassword1: {\n\t\t\ttitle: '" . T_('Confirm Password') . "',\n\t\t\ttype: 'string'\n\t\t},\n\t\tfirstname: {\n\t\t\ttitle: '" . T_('First Name') . "',\n\t\t\ttype: 'string'\n\t\t},\n\t\tlastname: {\n\t\t\ttitle: '" . T_('Last Name') . "',\n\t\t\ttype: 'string'\n\t\t},\n\t\temail: {\n\t\t\ttitle: '" . T_('Email') . "',\n\t\t\ttype: 'string'\n\t\t},\n\t\tlanguage: {\n\t\t\ttitle: '" . T_('Language') . "',\n\t\t\ttype: 'string'\n\t\t},\n\t\ttemplate: {\n\t\t\ttitle: '" . T_('Template') . "',\n\t\t\ttype: 'string'\n\t\t}\n\t},\n\t'required': [\n\t\t'username',\n\t\t'password0',\n\t\t'password1',\n\t\t'email',\n\t\t'language'\n\t]\n}";
// Form Definition
$form = "\n[\n\t{\n\t\t'key': 'username',\n\t\t'type': 'text',\n\t\tfieldAddonLeft: '<span class=\"glyphicon glyphicon-user\"></span>',\n\t\tplaceholder: '" . T_('Login') . "'\n\t},\n\t{\n\t\t'key': 'password0',\n\t\t'type': 'password',\n\t\tfieldAddonLeft: '<span class=\"glyphicon glyphicon-lock\"></span>',\n\t\tplaceholder: '" . T_('Password') . "'\n\t},\n\t{\n\t\t'key': 'password1',\n\t\t'type': 'password',\n\t\tfieldAddonLeft: '<span class=\"glyphicon glyphicon-lock\"></span>',\n\t\tplaceholder: '" . T_('Password') . "'\n\t},\n\t{\n\t\t'key': 'firstname',\n\t\t'type': 'text',\n\t\tfieldAddonLeft: 'Optional'\n\t},\n\t{\n\t\t'key': 'lastname',\n\t\t'type': 'text',\n\t\tfieldAddonLeft: 'Optional'\n\t},\n\t{\n\t\t'key': 'email',\n\t\t'type': 'email',\n\t\tfieldAddonLeft: '<span class=\"glyphicon glyphicon-envelope\"></span>',\n\t\tplaceholder: '" . T_('Email') . "'\n\t},\n\t{\n\t\t'key': 'language',\n\t\t'type': 'select',\n\t\ttitleMap: " . $langMap . "\n\t},\n\t{\n\t\t'key': 'template',\n\t\t'type': 'select',\n\t\ttitleMap: " . $templateMap . "\n\t}\n]";
// Model Init
$model = json_encode(array('username' => htmlspecialchars($profile['username'], ENT_QUOTES), 'password0', 'password1', 'firstname' => htmlspecialchars($profile['firstname'], ENT_QUOTES), 'lastname' => htmlspecialchars($profile['lastname'], ENT_QUOTES), 'email' => htmlspecialchars($profile['email'], ENT_QUOTES), 'language' => htmlspecialchars(Core_AuthService::getSessionInfo('LANG'), ENT_QUOTES), 'template' => htmlspecialchars($profile['template'], ENT_QUOTES)), JSON_FORCE_OBJECT);
$js->getAngularCode('updateUserConfig', $schema, $form, $model);
?>
					<!-- END: SCRIPT -->

<?php 
//------------------------------------------------------------------------------------------------------------+
/**
 * END: PAGE BODY
 */
/**
 * Build Page Footer
 */
$gui->getFooter();
Exemplo n.º 3
0
?>
					<!-- CONTENTS -->
					<div class="row">

					</div>
					<!-- END: CONTENTS -->

					<!-- SCRIPT -->
<?php 
/**
 * Generate AngularJS Code
 *
 * @param 	String 	$task
 * @param 	String 	$schema
 * @param 	String 	$form
 * @param 	String 	$model
 * @param 	String 	$redirect
 */
$js->getAngularCode();
?>
					<!-- END: SCRIPT -->

<?php 
//------------------------------------------------------------------------------------------------------------+
/**
 * END: PAGE BODY
 */
/**
 * Build Page Footer
 */
$gui->getFooter();
Exemplo n.º 4
0
 * @param 	String 	$redirect
 */
// Schema Definition
$schema = "\n{\n\ttype: 'object',\n\tproperties: {\n\t\tusername: {\n\t\t\ttitle: '" . T_('Username') . "',\n\t\t\ttype: 'string'\n\t\t},\n\t\tpassword: {\n\t\t\ttitle: '" . T_('Password') . "',\n\t\t\ttype: 'string'\n\t\t},\n\t\trememberMe: {\n\t\t\ttype: 'boolean',\n\t\t\ttitle: '" . T_('Remember Me') . "'\n\t\t}\n\t},\n\t'required': [\n\t\t'username',\n\t\t'password'\n\t]\n}";
// Form Definition
$form = "\n[\n\t{\n\t\t'key': 'username',\n\t\t'type': 'text',\n\t\tfieldAddonLeft: '<span class=\"glyphicon glyphicon-user\"></span>',\n\t\tplaceholder: '" . T_('Login') . "',\n\t\tdisableSuccessState: true\n\t},\n\t{\n\t\t'key': 'password',\n\t\t'type': 'password',\n\t\tfieldAddonLeft: '<span class=\"glyphicon glyphicon-lock\"></span>',\n\t\tplaceholder: '" . T_('Password') . "',\n\t\tdisableSuccessState: true\n\t},\n\t{\n\t\t'key': 'rememberMe',\n\t\t'type': 'checkbox',\n\t\tdisableSuccessState: true\n\t}\n]";
// Model Init
if (isset($_COOKIE['USERNAME'])) {
    $model = json_encode(array('username' => htmlspecialchars($_COOKIE['USERNAME'], ENT_QUOTES)), JSON_FORCE_OBJECT);
} else {
    $model = json_encode(array(), JSON_FORCE_OBJECT);
}
// Redirect
if (!empty($_GET['page'])) {
    $redirect = '.' . $_GET['page'];
} else {
    $redirect = './';
}
$js->getAngularCode('authenticateUser', $schema, $form, $model, $redirect);
?>
					<!-- END: SCRIPT -->

<?php 
//------------------------------------------------------------------------------------------------------------+
/**
 * END: PAGE BODY
 */
/**
 * Build Page Footer
 */
$gui->getFooter();
Exemplo n.º 5
0
					<!-- END: CONTENTS -->

					<!-- SCRIPT -->
<?php 
/**
 * Generate AngularJS Code
 *
 * @param 	String 	$task
 * @param 	String 	$schema
 * @param 	String 	$form
 * @param 	String 	$model
 * @param 	String 	$redirect
 */
// Schema Definition
$schema = "\n{\n\ttype: 'object',\n\tproperties: {\n\t\tname: {\n\t\t\ttitle: '" . T_('Remote Machine Name') . "',\n\t\t\ttype: 'string'\n\t\t},\n\t\tos: {\n\t\t\ttitle: '" . T_('Operating System') . "',\n\t\t\ttype: 'string'\n\t\t},\n\t\tcom: {\n\t\t\ttitle: '" . T_('Communications Protocol') . "',\n\t\t\ttype: 'string'\n\t\t},\n\t\tip: {\n\t\t\ttitle: '" . T_('IP Address') . "',\n\t\t\ttype: 'string'\n\t\t},\n\t\tport: {\n\t\t\ttitle: '" . T_('Port') . "',\n\t\t\ttype: 'string'\n\t\t},\n\t\tlogin: {\n\t\t\ttitle: '" . T_('Login') . "',\n\t\t\ttype: 'string'\n\t\t},\n\t\tpassword: {\n\t\t\ttitle: '" . T_('Password') . "',\n\t\t\ttype: 'string'\n\t\t},\n\t\tremoteUserHome: {\n\t\t\ttitle: '" . T_('Remote User Home Path') . "',\n\t\t\ttype: 'string'\n\t\t},\n\t\tsteamcmd: {\n\t\t\ttitle: '" . T_('SteamCMD Binary Path') . "',\n\t\t\ttype: 'string'\n\t\t},\n\t\tnotes: {\n\t\t\ttitle: '" . T_('Notes') . "',\n\t\t\ttype: 'string'\n\t\t}\n\t},\n\t'required': [\n\t\t'name',\n\t\t'ip',\n\t\t'com',\n\t\t'login',\n\t\t'password',\n\t\t'port'\n\t]\n}";
// Form Definition
$form = "\n[\n\t{\n\t\tkey: 'name',\n\t\ttype: 'text',\n\t\tfieldAddonLeft: '<span class=\"glyphicon glyphicon-font\"></span>'\n\t},\n\t{\n\t\tkey: 'os',\n\t\ttype: 'select',\n\t\ttitleMap: " . $osMap . "\n\t},\n\t{\n\t\tkey: 'com',\n\t\ttype: 'text',\n\t\treadonly: true,\n\t\tdisableSuccessState: true,\n\t},\n\t{\n\t\tkey: 'ip',\n\t\ttype: 'text',\n\t\tfieldAddonLeft: '<span class=\"glyphicon glyphicon-globe\"></span>'\n\t},\n\t{\n\t\tkey: 'port',\n\t\ttype: 'text',\n\t\tplaceholder: '22',\n\t\tfieldAddonLeft: '<span class=\"glyphicon glyphicon-log-in\"></span>'\n\t},\n\t{\n\t\tkey: 'login',\n\t\ttype: 'text',\n\t\tfieldAddonLeft: '<span class=\"glyphicon glyphicon-user\"></span>'\n\t},\n\t{\n\t\tkey: 'password',\n\t\ttype: 'password',\n\t\tfieldAddonLeft: '<span class=\"glyphicon glyphicon-lock\"></span>'\n\t},\n\t{\n\t\tkey: 'remoteUserHome',\n\t\ttype: 'text',\n\t\tplaceholder: '/home/{user}/',\n\t\tfieldAddonLeft: 'Optional',\n\t\tdisableSuccessState: true\n\t},\n\t{\n\t\tkey: 'steamcmd',\n\t\ttype: 'text',\n\t\tplaceholder: '/home/{user}/steamcmd.sh',\n\t\tfieldAddonLeft: 'Optional',\n\t\tdisableSuccessState: true\n\t},\n\t{\n\t\tkey: 'notes',\n\t\ttype: 'textarea',\n\t\tdisableSuccessState: true\n\t},\n]";
$model = json_encode(array('os' => '1', 'com' => 'ssh2'), JSON_FORCE_OBJECT);
$js->getAngularCode('postBox', $schema, $form, $model, './box');
?>
					<!-- END: SCRIPT -->

<?php 
//------------------------------------------------------------------------------------------------------------+
/**
 * END: PAGE BODY
 */
/**
 * Build Page Footer
 */
$gui->getFooter();
Exemplo n.º 6
0
					<!-- END: CONTENTS -->

					<!-- SCRIPT -->
<?php 
/**
 * Generate AngularJS Code
 *
 * @param 	String 	$task
 * @param 	String 	$schema
 * @param 	String 	$form
 * @param 	String 	$model
 * @param 	String 	$redirect
 */
// Schema Definition
$schema = "\n{\n\ttype: 'object',\n\tproperties: {\n\t\tname: {\n\t\t\ttitle: '" . T_('Remote Machine Name') . "',\n\t\t\ttype: 'string'\n\t\t},\n\t\tos: {\n\t\t\ttitle: '" . T_('Operating System') . "',\n\t\t\ttype: 'string'\n\t\t},\n\t\tsteamcmd: {\n\t\t\ttitle: '" . T_('SteamCMD Binary Path') . "',\n\t\t\ttype: 'string'\n\t\t},\n\t\tnotes: {\n\t\t\ttitle: '" . T_('Notes') . "',\n\t\t\ttype: 'string'\n\t\t}\n\t},\n\t'required': [\n\t\t'name'\n\t]\n}";
// Form Definition
$form = "\n[\n\t{\n\t\tkey: 'name',\n\t\ttype: 'text',\n\t\tfieldAddonLeft: '<span class=\"glyphicon glyphicon-font\"></span>'\n\t},\n\t{\n\t\tkey: 'os',\n\t\ttype: 'select',\n\t\ttitleMap: " . $osMap . "\n\t},\n\t{\n\t\tkey: 'steamcmd',\n\t\ttype: 'text',\n\t\tplaceholder: '/home/{user}/steamcmd.sh',\n\t\tfieldAddonLeft: 'Optional',\n\t\tdisableSuccessState: true\n\t},\n\t{\n\t\tkey: 'notes',\n\t\ttype: 'textarea',\n\t\tdisableSuccessState: true\n\t},\n]";
$model = json_encode(array('id' => htmlspecialchars($resId, ENT_QUOTES), 'name' => htmlspecialchars($resModel['name'], ENT_QUOTES), 'os' => htmlspecialchars($resModel['os_id'], ENT_QUOTES), 'steamcmd' => htmlspecialchars($resModel['steam_lib_path'], ENT_QUOTES), 'notes' => htmlspecialchars($resModel['notes'], ENT_QUOTES)), JSON_FORCE_OBJECT);
$js->getAngularCode('putBox', $schema, $form, $model, './box/view/' . $resId);
?>
					<!-- END: SCRIPT -->

<?php 
//------------------------------------------------------------------------------------------------------------+
/**
 * END: PAGE BODY
 */
/**
 * Build Page Footer
 */
$gui->getFooter();
Exemplo n.º 7
0
					<!-- SCRIPT -->
<?php 
/**
 * Generate AngularJS Code
 *
 * @param 	String 	$task
 * @param 	String 	$schema
 * @param 	String 	$form
 * @param 	String 	$model
 * @param 	String 	$redirect
 */
// Schema Definition
$schema = "\n{\n\ttype: 'object',\n\tproperties: {\n\t\tpanelName: {\n\t\t\ttitle: '" . T_('Panel Name') . "',\n\t\t\ttype: 'string'\n\t\t},\n\t\tsystemUrl: {\n\t\t\ttitle: '" . T_('Panel URL') . "',\n\t\t\ttype: 'string'\n\t\t},\n\t\tmaintenanceMode: {\n\t\t\ttitle: '" . T_('Enable Maintenance Mode') . "',\n\t\t\ttype: 'boolean'\n\t\t},\n\t\tuserTemplate: {\n\t\t\ttitle: '" . T_('Default User Template') . "',\n\t\t\ttype: 'string'\n\t\t}\n\t},\n\t'required': [\n\t\t'panelName',\n\t\t'systemUrl',\n\t\t'userTemplate'\n\t]\n}";
// Form Definition
$form = "\n[\n\t{\n\t\tkey: 'panelName',\n\t\ttype: 'text',\n\t\tfieldAddonLeft: '<span class=\"glyphicon glyphicon-font\"></span>'\n\t},\n\t{\n\t\tkey: 'systemUrl',\n\t\ttype: 'text',\n\t\tfieldAddonLeft: '<span class=\"glyphicon glyphicon-globe\"></span>'\n\t},\n\t{\n\t\ttype: 'help',\n\t\thelpvalue: \"<label>Maintenance Mode</label>\"\n\t},\n\t{\n\t\tkey: 'maintenanceMode',\n\t\ttype: 'checkbox',\n\t\tdisableSuccessState: true,\n\t},\n\t{\n\t\ttype: 'help',\n\t\thelpvalue: \"Switch the panel in maintenance mode. Only <b>Administrators</b> will be able to log into the panel. <br> <b>NOTE: CRON JOB IS DISABLED IN THIS MODE!</b> <br><br>\"\n\t},\n\t{\n\t\tkey: 'userTemplate',\n\t\ttype: 'select',\n\t\ttitleMap: " . $templateMap . "\n\t}\n]";
// Model Init
$model = json_encode(array('panelName' => htmlspecialchars($current_config['panel_name'], ENT_QUOTES), 'systemUrl' => htmlspecialchars($current_config['system_url'], ENT_QUOTES), 'maintenanceMode' => boolval($current_config['maintenance_mode']), 'userTemplate' => htmlspecialchars($current_config['user_template'], ENT_QUOTES)), JSON_FORCE_OBJECT);
$js->getAngularCode('updateSysConfig', $schema, $form, $model, './config');
?>
					<!-- END: SCRIPT -->

<?php 
//------------------------------------------------------------------------------------------------------------+
/**
 * END: PAGE BODY
 */
/**
 * Build Page Footer
 */
$gui->getFooter();
Exemplo n.º 8
0
						</div>
					</div>
					<!-- END: CONTENTS -->

					<!-- SCRIPT -->
<?php 
/**
 * Generate AngularJS Code
 *
 * @param 	String 	$task
 * @param 	String 	$schema
 * @param 	String 	$form
 * @param 	String 	$model
 * @param 	String 	$redirect
 */
$schema = json_encode(array(), JSON_FORCE_OBJECT);
$form = json_encode(array(), JSON_FORCE_OBJECT);
$model = json_encode(array(), JSON_FORCE_OBJECT);
$js->getAngularCode('optimizeDB', $schema, $form, $model, './tools/opdb');
?>
					<!-- END: SCRIPT -->

<?php 
//------------------------------------------------------------------------------------------------------------+
/**
 * END: PAGE BODY
 */
/**
 * Build Page Footer
 */
$gui->getFooter();