Revert "Complete rebrand from Open Game Panel (OGP) to GameServer Panel (GSP)"
This commit is contained in:
parent
02c94766c6
commit
deee7d6ac5
308 changed files with 1412 additions and 1412 deletions
|
|
@ -3,7 +3,7 @@
|
|||
require 'include/ticket.php';
|
||||
require 'include/TicketSettings.php';
|
||||
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
global $db;
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ class Attachments
|
|||
|
||||
private $errors = array();
|
||||
|
||||
public function __construct(GSPDatabase $db, $attachments, $path, $maxAttachments, $maxSize, $permittedExtensions)
|
||||
public function __construct(OGPDatabase $db, $attachments, $path, $maxAttachments, $maxSize, $permittedExtensions)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@ class TicketSettings
|
|||
{
|
||||
private $db;
|
||||
|
||||
public function __construct(GSPDatabase $db)
|
||||
public function __construct(OGPDatabase $db)
|
||||
{
|
||||
$this->db = $db;
|
||||
}
|
||||
|
||||
public function get($setting = '*')
|
||||
{
|
||||
$query = "SELECT setting_name, setting_value FROM GSP_DB_PREFIXticket_settings";
|
||||
$query = "SELECT setting_name, setting_value FROM OGP_DB_PREFIXticket_settings";
|
||||
|
||||
if (is_array($setting) && !empty($setting)) {
|
||||
$in = '';
|
||||
|
|
@ -44,7 +44,7 @@ class TicketSettings
|
|||
$setting_name = $this->db->real_escape_string($setting_name);
|
||||
$setting_value = $this->db->real_escape_string($setting_value);
|
||||
|
||||
$queryString = "INSERT INTO GSP_DB_PREFIXticket_settings (setting_name, setting_value)
|
||||
$queryString = "INSERT INTO OGP_DB_PREFIXticket_settings (setting_name, setting_value)
|
||||
VALUES (
|
||||
'". $setting_name ."', '". $setting_value ."'
|
||||
)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ class Ticket
|
|||
{
|
||||
private $db;
|
||||
|
||||
public function __construct(GSPDatabase $db)
|
||||
public function __construct(OGPDatabase $db)
|
||||
{
|
||||
$this->db = $db;
|
||||
}
|
||||
|
|
@ -14,13 +14,13 @@ class Ticket
|
|||
$limitStart = ((int)($page - 1) * $limit);
|
||||
|
||||
$query = "SELECT a.tid, a.uid, a.user_id, a.parent_id, a.subject, a.created_at, a.last_updated, a.status, a.assigned_to
|
||||
FROM GSP_DB_PREFIXtickets a ";
|
||||
FROM OGP_DB_PREFIXtickets a ";
|
||||
|
||||
if ($ticketsFor !== null) {
|
||||
$query .= "WHERE a.user_id = ".(int)$ticketsFor." OR a.parent_id = ".(int)$ticketsFor." ";
|
||||
|
||||
if ($this->db->isSubUser($ticketsFor)) {
|
||||
$result = $this->db->resultQuery("SELECT users_parent FROM GSP_DB_PREFIXusers WHERE user_id = ".(int)$ticketsFor);
|
||||
$result = $this->db->resultQuery("SELECT users_parent FROM OGP_DB_PREFIXusers WHERE user_id = ".(int)$ticketsFor);
|
||||
$query .= "OR a.parent_id = ".(int)$result[0]['users_parent']." ";
|
||||
}
|
||||
}
|
||||
|
|
@ -33,13 +33,13 @@ class Ticket
|
|||
|
||||
public function count($ticketsFor = null)
|
||||
{
|
||||
$query = "SELECT COUNT(1) as ticketCount FROM GSP_DB_PREFIXtickets a ";
|
||||
$query = "SELECT COUNT(1) as ticketCount FROM OGP_DB_PREFIXtickets a ";
|
||||
|
||||
if ($ticketsFor !== null) {
|
||||
$query .= "WHERE a.user_id = ".(int)$ticketsFor." OR a.parent_id = ".(int)$ticketsFor." ";
|
||||
|
||||
if ($this->db->isSubUser($ticketsFor)) {
|
||||
$result = $this->db->resultQuery("SELECT users_parent FROM GSP_DB_PREFIXusers WHERE user_id = ".(int)$ticketsFor);
|
||||
$result = $this->db->resultQuery("SELECT users_parent FROM OGP_DB_PREFIXusers WHERE user_id = ".(int)$ticketsFor);
|
||||
$query .= "OR a.parent_id = ".(int)$result[0]['users_parent']." ";
|
||||
}
|
||||
}
|
||||
|
|
@ -50,13 +50,13 @@ class Ticket
|
|||
|
||||
public function notificationCount($ticketsFor = null, $status = 0)
|
||||
{
|
||||
$query = "SELECT COUNT(1) as ticketCount FROM GSP_DB_PREFIXtickets a WHERE a.status = ".(int)$status." ";
|
||||
$query = "SELECT COUNT(1) as ticketCount FROM OGP_DB_PREFIXtickets a WHERE a.status = ".(int)$status." ";
|
||||
|
||||
if ($ticketsFor !== null) {
|
||||
$query .= "AND (a.user_id = ".(int)$ticketsFor." OR a.parent_id = ".(int)$ticketsFor." ";
|
||||
|
||||
if ($this->db->isSubUser($ticketsFor)) {
|
||||
$result = $this->db->resultQuery("SELECT users_parent FROM GSP_DB_PREFIXusers WHERE user_id = ".(int)$ticketsFor);
|
||||
$result = $this->db->resultQuery("SELECT users_parent FROM OGP_DB_PREFIXusers WHERE user_id = ".(int)$ticketsFor);
|
||||
$query .= "OR a.parent_id = ".(int)$result[0]['users_parent'].")";
|
||||
} else {
|
||||
$query .= ")";
|
||||
|
|
@ -71,8 +71,8 @@ class Ticket
|
|||
{
|
||||
$query = "SELECT a.tid, a.uid, a.user_id, a.user_ip, a.subject, a.status, a.service_id, a.created_at, a.last_updated,
|
||||
b.users_login, b.users_fname, b.users_lname, b.users_role, b.users_email
|
||||
FROM GSP_DB_PREFIXtickets a
|
||||
JOIN GSP_DB_PREFIXusers b
|
||||
FROM OGP_DB_PREFIXtickets a
|
||||
JOIN OGP_DB_PREFIXusers b
|
||||
ON (a.user_id = b.user_id)
|
||||
WHERE tid = $tid
|
||||
AND uid = '".$this->db->real_escape_string($uid)."'";
|
||||
|
|
@ -96,8 +96,8 @@ class Ticket
|
|||
{
|
||||
$query = "SELECT a.reply_id, a.ticket_id, a.user_id, a.user_ip, a.message, a.date, a.rating, a.is_admin,
|
||||
b.user_id, b.users_login, b.users_role, b.users_fname, b.users_lname, b.users_email, b.users_parent
|
||||
FROM GSP_DB_PREFIXticket_messages a
|
||||
JOIN GSP_DB_PREFIXusers b
|
||||
FROM OGP_DB_PREFIXticket_messages a
|
||||
JOIN OGP_DB_PREFIXusers b
|
||||
ON (a.user_id = b.user_id)
|
||||
WHERE a.ticket_id = $tid
|
||||
ORDER BY a.reply_id DESC";
|
||||
|
|
@ -108,7 +108,7 @@ class Ticket
|
|||
private function getAttachments($tid)
|
||||
{
|
||||
$query = "SELECT attachment_id, reply_id, original_name, unique_name
|
||||
FROM GSP_DB_PREFIXticket_attachments
|
||||
FROM OGP_DB_PREFIXticket_attachments
|
||||
WHERE ticket_id = $tid
|
||||
ORDER BY reply_id DESC";
|
||||
|
||||
|
|
@ -144,7 +144,7 @@ class Ticket
|
|||
{
|
||||
$parent_id = $user_id;
|
||||
if ($this->db->isSubUser($user_id)) {
|
||||
$result = $this->db->resultQuery("SELECT users_parent FROM GSP_DB_PREFIXusers WHERE user_id = ".(int)$user_id);
|
||||
$result = $this->db->resultQuery("SELECT users_parent FROM OGP_DB_PREFIXusers WHERE user_id = ".(int)$user_id);
|
||||
$parent_id = (int)$result[0]['users_parent'];
|
||||
}
|
||||
|
||||
|
|
@ -199,17 +199,17 @@ class Ticket
|
|||
public function updateStatus($tid, $uid, $status)
|
||||
{
|
||||
$status = (int)$status;
|
||||
return $this->db->query("UPDATE GSP_DB_PREFIXtickets SET status = $status WHERE tid = $tid AND uid = '$uid'");
|
||||
return $this->db->query("UPDATE OGP_DB_PREFIXtickets SET status = $status WHERE tid = $tid AND uid = '$uid'");
|
||||
}
|
||||
|
||||
public function updateTimestamp($tid, $uid)
|
||||
{
|
||||
return $this->db->query("UPDATE GSP_DB_PREFIXtickets SET last_updated = NOW() WHERE tid = $tid AND uid = '$uid'");
|
||||
return $this->db->query("UPDATE OGP_DB_PREFIXtickets SET last_updated = NOW() WHERE tid = $tid AND uid = '$uid'");
|
||||
}
|
||||
|
||||
public function exists($tid, $uid)
|
||||
{
|
||||
$query = "SELECT COUNT(1) AS ticketCount FROM GSP_DB_PREFIXtickets
|
||||
$query = "SELECT COUNT(1) AS ticketCount FROM OGP_DB_PREFIXtickets
|
||||
WHERE `tid` = $tid AND
|
||||
`uid` = '".$this->db->real_escape_string($uid)."'";
|
||||
|
||||
|
|
@ -220,8 +220,8 @@ class Ticket
|
|||
public function authorized($user_id, $tid, $uid)
|
||||
{
|
||||
$query = "SELECT a.user_id as utid, a.parent_id, b.user_id, b.users_parent
|
||||
FROM GSP_DB_PREFIXtickets a
|
||||
JOIN GSP_DB_PREFIXusers b
|
||||
FROM OGP_DB_PREFIXtickets a
|
||||
JOIN OGP_DB_PREFIXusers b
|
||||
ON (
|
||||
a.user_id = b.user_id
|
||||
OR a.user_id = b.users_parent
|
||||
|
|
@ -263,7 +263,7 @@ class Ticket
|
|||
|
||||
public function setRating($tid, $reply_id, $rating)
|
||||
{
|
||||
$query = "UPDATE GSP_DB_PREFIXticket_messages
|
||||
$query = "UPDATE OGP_DB_PREFIXticket_messages
|
||||
SET rating = ".(int)$rating."
|
||||
WHERE ticket_id = ".(int)$tid." AND reply_id = ".(int)$reply_id;
|
||||
|
||||
|
|
@ -273,7 +273,7 @@ class Ticket
|
|||
// Move this to the attachment class...?
|
||||
public function getAttachmentById($attachment_id, $tid)
|
||||
{
|
||||
$query = "SELECT original_name, unique_name FROM GSP_DB_PREFIXticket_attachments
|
||||
$query = "SELECT original_name, unique_name FROM OGP_DB_PREFIXticket_attachments
|
||||
WHERE attachment_id = ".(int)$attachment_id." AND ticket_id = ".(int)$tid;
|
||||
|
||||
$result = $this->db->resultQuery($query);
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
* GSP - GameServer Panel
|
||||
* Copyright (C) 2008 - 2017 The GSP Development Team
|
||||
* OGP - Open Game Panel
|
||||
* Copyright (C) 2008 - 2017 The OGP Development Team
|
||||
*
|
||||
* http://www.gameserver-panel.org/
|
||||
* http://www.opengamepanel.org/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
|
@ -40,14 +40,14 @@ $module_menus = array(
|
|||
);
|
||||
|
||||
$install_queries[0] = array(
|
||||
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."ticket_replies`",
|
||||
"DROP TABLE IF EXISTS `".OGP_DB_PREFIX."ticket_replies`",
|
||||
|
||||
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."ticket_messages`",
|
||||
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."ticket_attachments`",
|
||||
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."ticket_settings`",
|
||||
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."tickets`",
|
||||
"DROP TABLE IF EXISTS `".OGP_DB_PREFIX."ticket_messages`",
|
||||
"DROP TABLE IF EXISTS `".OGP_DB_PREFIX."ticket_attachments`",
|
||||
"DROP TABLE IF EXISTS `".OGP_DB_PREFIX."ticket_settings`",
|
||||
"DROP TABLE IF EXISTS `".OGP_DB_PREFIX."tickets`",
|
||||
|
||||
"CREATE TABLE IF NOT EXISTS `".GSP_DB_PREFIX."tickets` (
|
||||
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."tickets` (
|
||||
`tid` int NOT NULL AUTO_INCREMENT,
|
||||
`uid` varchar(32) NOT NULL UNIQUE,
|
||||
`user_id` int NOT NULL,
|
||||
|
|
@ -62,7 +62,7 @@ $install_queries[0] = array(
|
|||
PRIMARY KEY (`tid`)
|
||||
);",
|
||||
|
||||
"CREATE TABLE IF NOT EXISTS `".GSP_DB_PREFIX."ticket_messages` (
|
||||
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."ticket_messages` (
|
||||
`reply_id` int NOT NULL AUTO_INCREMENT,
|
||||
`ticket_id` int NOT NULL,
|
||||
`user_id` int NOT NULL,
|
||||
|
|
@ -74,11 +74,11 @@ $install_queries[0] = array(
|
|||
PRIMARY KEY (`reply_id`)
|
||||
);",
|
||||
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."ticket_messages` ADD CONSTRAINT `".GSP_DB_PREFIX."ticket_messages_fk0` FOREIGN KEY (`ticket_id`) REFERENCES `".GSP_DB_PREFIX."tickets`(`tid`);",
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."ticket_messages` ADD CONSTRAINT `".OGP_DB_PREFIX."ticket_messages_fk0` FOREIGN KEY (`ticket_id`) REFERENCES `".OGP_DB_PREFIX."tickets`(`tid`);",
|
||||
);
|
||||
|
||||
$install_queries[1] = array(
|
||||
"CREATE TABLE IF NOT EXISTS `".GSP_DB_PREFIX."ticket_attachments` (
|
||||
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."ticket_attachments` (
|
||||
`attachment_id` int NOT NULL AUTO_INCREMENT,
|
||||
`ticket_id` int NOT NULL,
|
||||
`reply_id` int,
|
||||
|
|
@ -89,21 +89,21 @@ $install_queries[1] = array(
|
|||
);
|
||||
|
||||
$install_queries[2] = array(
|
||||
"CREATE TABLE IF NOT EXISTS `".GSP_DB_PREFIX."ticket_settings` (
|
||||
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."ticket_settings` (
|
||||
`id` INT NOT NULL AUTO_INCREMENT,
|
||||
`setting_name` varchar(32) NOT NULL UNIQUE,
|
||||
`setting_value` TEXT NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
);",
|
||||
|
||||
"INSERT INTO `".GSP_DB_PREFIX."ticket_settings` (setting_name, setting_value) VALUES ('ratings_enabled', true) ON DUPLICATE KEY UPDATE `setting_name` = 'ratings_enabled', `setting_value` = true",
|
||||
"INSERT INTO `".GSP_DB_PREFIX."ticket_settings` (setting_name, setting_value) VALUES ('attachments_enabled', true) ON DUPLICATE KEY UPDATE `setting_name` = 'attachments_enabled', `setting_value` = true",
|
||||
"INSERT INTO `".GSP_DB_PREFIX."ticket_settings` (setting_name, setting_value) VALUES ('attachment_max_size', '52428800') ON DUPLICATE KEY UPDATE `setting_name` = 'attachment_max_size', `setting_value` = '52428800'",
|
||||
"INSERT INTO `".GSP_DB_PREFIX."ticket_settings` (setting_name, setting_value) VALUES ('attachment_limit', '5') ON DUPLICATE KEY UPDATE `setting_name` = 'attachment_limit', `setting_value` = '5'",
|
||||
"INSERT INTO `".GSP_DB_PREFIX."ticket_settings` (setting_name, setting_value) VALUES ('attachment_save_dir', '".__DIR__ . '/uploads' ."') ON DUPLICATE KEY UPDATE `setting_name` = 'attachment_save_dir', `setting_value` = '".__DIR__ . '/uploads' ."'",
|
||||
"INSERT INTO `".GSP_DB_PREFIX."ticket_settings` (setting_name, setting_value) VALUES ('attachment_extensions', 'jpg, gif, jpeg, jpg, png, pdf, txt, sql, zip') ON DUPLICATE KEY UPDATE `setting_name` = 'attachment_extensions', `setting_value` = 'jpg, gif, jpeg, jpg, png, pdf, txt, sql, zip'",
|
||||
"INSERT INTO `".OGP_DB_PREFIX."ticket_settings` (setting_name, setting_value) VALUES ('ratings_enabled', true) ON DUPLICATE KEY UPDATE `setting_name` = 'ratings_enabled', `setting_value` = true",
|
||||
"INSERT INTO `".OGP_DB_PREFIX."ticket_settings` (setting_name, setting_value) VALUES ('attachments_enabled', true) ON DUPLICATE KEY UPDATE `setting_name` = 'attachments_enabled', `setting_value` = true",
|
||||
"INSERT INTO `".OGP_DB_PREFIX."ticket_settings` (setting_name, setting_value) VALUES ('attachment_max_size', '52428800') ON DUPLICATE KEY UPDATE `setting_name` = 'attachment_max_size', `setting_value` = '52428800'",
|
||||
"INSERT INTO `".OGP_DB_PREFIX."ticket_settings` (setting_name, setting_value) VALUES ('attachment_limit', '5') ON DUPLICATE KEY UPDATE `setting_name` = 'attachment_limit', `setting_value` = '5'",
|
||||
"INSERT INTO `".OGP_DB_PREFIX."ticket_settings` (setting_name, setting_value) VALUES ('attachment_save_dir', '".__DIR__ . '/uploads' ."') ON DUPLICATE KEY UPDATE `setting_name` = 'attachment_save_dir', `setting_value` = '".__DIR__ . '/uploads' ."'",
|
||||
"INSERT INTO `".OGP_DB_PREFIX."ticket_settings` (setting_name, setting_value) VALUES ('attachment_extensions', 'jpg, gif, jpeg, jpg, png, pdf, txt, sql, zip') ON DUPLICATE KEY UPDATE `setting_name` = 'attachment_extensions', `setting_value` = 'jpg, gif, jpeg, jpg, png, pdf, txt, sql, zip'",
|
||||
);
|
||||
|
||||
$install_queries[3] = array(
|
||||
"INSERT INTO `".GSP_DB_PREFIX."ticket_settings` (setting_name, setting_value) VALUES ('notifications_enabled', true) ON DUPLICATE KEY UPDATE `setting_name` = 'notifications_enabled', `setting_value` = true",
|
||||
"INSERT INTO `".OGP_DB_PREFIX."ticket_settings` (setting_name, setting_value) VALUES ('notifications_enabled', true) ON DUPLICATE KEY UPDATE `setting_name` = 'notifications_enabled', `setting_value` = true",
|
||||
);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
require 'include/ticket.php';
|
||||
require 'include/TicketSettings.php';
|
||||
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
global $db;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
require 'include/ticket.php';
|
||||
require 'include/TicketSettings.php';
|
||||
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
global $db, $view;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ require 'include/TicketSettings.php';
|
|||
|
||||
require 'include/functions.php';
|
||||
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
global $db, $view;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
require 'include/ticket.php';
|
||||
require 'include/functions.php';
|
||||
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
global $db, $loggedInUserInfo;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ require 'include/functions.php';
|
|||
require 'include/TicketSettings.php';
|
||||
require 'includes/form_table_class.php';
|
||||
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
global $db, $view;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ require 'include/TicketSettings.php';
|
|||
|
||||
require 'include/functions.php';
|
||||
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
global $db, $view;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue