This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Sun Apr 14 05:55:45.358231 2019] [php7:notice] [pid 24] [client 10.0.2.2:51644] STRICT error Non-static method Misc::currentURL() should not be called statically at /data/upload/bootstrap.php:388 n, referer: http://localhost:8080/scp/ | |
[Sun Apr 14 05:55:45.358400 2019] [php7:notice] [pid 24] [client 10.0.2.2:51644] STRICT error Undefined index: HTTPS at /data/upload/include/class.misc.php:229 n, referer: http://localhost:8080/scp/ | |
[Sun Apr 14 05:55:45.358479 2019] [php7:notice] [pid 24] [client 10.0.2.2:51644] STRICT error Non-static method Bootstrap::loadConfig() should not be called statically at /data/upload/main.inc.php:24 n, referer: http://localhost:8080/scp/ | |
[Sun Apr 14 05:55:45.361491 2019] [php7:notice] [pid 24] [client 10.0.2.2:51644] STRICT error Non-static method Bootstrap::i18n_prep() should not be called statically at /data/upload/main.inc.php:26 n, referer: http://localhost:8080/scp/ | |
[Sun Apr 14 05:55:45.361603 2019] [php7:notice] [pid 24] [client 10.0.2.2:51644] STRICT error iconv_set_encoding |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// stored in /include/custom.php | |
// A private database connection to fetch data for the sales team: | |
class SalesDB | |
{ | |
private $db; | |
public function __construct() | |
{ | |
$this->db = new mysqli("server", 'username', 'pass', 'database_name'); //etc | |
$this->db->set_charset("utf8"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php -q | |
<?php | |
/********************************************************************* | |
rcron.php | |
PHP script used for remote cron calls. | |
To make this work, setup an API key for localhost with ip: 127.0.0.1 | |
Put this script in the root of your webserver, then call it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python3 | |
import json | |
import urllib2 | |
''' | |
Loads as many settings as makes sense for every domain in your account | |
Then stores those settings in a json file named for the domain. | |
''' | |
api_prefix = 'https://api.cloudflare.com/client/v4/zones/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Example crontab, every Friday night etc: | |
#m h dom mon dow command | |
0 23 * * 5 /path/to/support/prune_files.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
An example service definition for nagios that assumes you have the following information: | |
$DATABASE_{HOST,NAME,USER,PASS} for connecting to the database | |
$DOMAIN = to create a Nagios link | |
$PREFIX = what you used to prefix your db in osTicket (commonly ost) | |
Ensure check_mysql_query is installed and working, create a read-only db-user from your nagios host to your database, | |
tweak the open and unassigned ticket count to your liking, in this example 100 = warning, 250 = critical | |
define service { | |
host_name $DATABASE_HOST | |
service_description OsTickets Open Tickets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mechanize | |
import cookielib | |
import urllib2 | |
# Configure the server IP, Username & Password (defaults provided) | |
server='10.0.0.1:8181' | |
username='administrator' | |
password='admin123' | |
# Using mechanize: http://wwwsearch.sourceforge.net/mechanize/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 49c17afdb035cf825288613cc1011aeb86ebdb01 Mon Sep 17 00:00:00 2001 | |
From: Grizly <clonemeagain@gmail.com> | |
Date: Sun, 26 Jan 2014 10:44:36 +1100 | |
Subject: [PATCH 1/1] Actual changes to osTicket to implement Custom PHP file | |
actions for Ticket Filters. | |
--- | |
include/class.filter.php | 7 +++++++ | |
include/staff/filter.inc.php | 20 ++++++++++++++++++++ | |
2 files changed, 27 insertions(+), 0 deletions(-) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I've just trawled the code (including latest dev), and no, there is no part of it which will do that.. | |
Shouldn't be too hard to implement though, just a few modifications, and a single db entry! | |
First, Run this query to create the template: | |
<?php | |
INSERT INTO `tickets`.`ost_email_template` (`id`, `tpl_id`, `code_name`, `subject`, `body`, `created`, `updated`) VALUES (NULL, 1, 'ticket.close', '[#%{ticket.number}] %{ticket.subject}', '%{ticket.name}, | |
Our customer care team has closed the ticket, #%{ticket.number} on your behalf. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define ( 'HIGH_PRIORITY', 1 ); | |
define ( 'NORMAL_PRIORITY', 2 ); | |
define ( 'LOW_PRIORITY', 3 ); | |
define ( 'NO_PRIORITY', 0 ); | |
echo "Time to beat: 0.027ms\n"; | |
test ( 'StrPos', 'strposversion' ); | |
test ( 'PregMatch', 'pregmatchversion' ); |
NewerOlder