Beispiel #1
0
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>. 
 */
require_once '../../core/init.php';
header('Location: ' . HOME_URL . 'panel/notava.php');
die;
$user->checkLogin(true);
// Check his rights
if ($userInfo['rights_igcmds'] < 100) {
    header('Location: ' . HOME_URL . 'panel/accessDenied.php');
    die;
}
// Fetch the in-game commands
$igc = new IgCommands(null, null, null, null, $db, $config, null, $settings);
$igcmds = $igc->getCommands();
$pageTitle = $lang['tool_igcmds'];
include CORE_DIR . '/cp_header.php';
?>
			
			<div class="row">
				<div class="col-md-12">
					
					<h2><i class="fa fa-bullhorn"></i> <?php 
echo $lang['tool_igcmds'];
?>
 <small><?php 
echo $lang['tool_igcmds_desc'];
?>
</small></h2>
Beispiel #2
0
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>. 
 */
require_once '../../core/init.php';
$user->checkLogin(true);
// Check his rights
if ($userInfo['rights_igcmds'] < 100) {
    header('Location: ' . HOME_URL . 'panel/accessDenied.php');
    die;
}
// In-game command class
$igc = new IgCommands(null, null, null, null, $db, $config, null, $settings);
$pageTitle = $lang['tool_igcmds'];
include CORE_DIR . '/cp_header.php';
if (isset($_GET['id'])) {
    $cmd = $igc->getCommand($_GET['id']);
} else {
    $cmd = $igc->getCommand(0);
}
if ($cmd['code'] == 'OK') {
    $cmd = $cmd['cmd'];
    $status = '';
    if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['cmd']) && isset($_POST['func']) && isset($_POST['response']) && isset($_POST['rights'])) {
        sleep(2);
        $errors = array();
        // Clean the post variables
        foreach ($_POST as $key => $value) {
Beispiel #3
0
             $response['msg'] = $lang['msg_cmd_noaccess'];
         }
     } else {
         $response['msg'] = $lang['msg_cmd_missingvars'];
     }
     break;
     /**
      * Delete from in-game commands
      */
 /**
  * Delete from in-game commands
  */
 case 'deleteIgcmd':
     if (isset($_POST['vars']['id'])) {
         if ($userInfo['rights_igcmds'] >= 100) {
             $igc = new IgCommands(null, null, null, null, $db, $config, null, $settings);
             if ($igc->deleteCommand($_POST['vars']['id'])) {
                 $response['status'] = 'OK';
                 $response['msg'] = $lang['tool_igcmds_deleted'];
                 $log->insertActionLog($userInfo['user_id'], 'In-game command deleted');
             } else {
                 $response['msg'] = $lang['msg_cmd_failed'];
             }
         } else {
             $response['msg'] = $lang['msg_cmd_noaccess'];
         }
     } else {
         $response['msg'] = $lang['msg_cmd_missingvars'];
     }
     break;
     /**