/www/wwwroot/jewelryshop/upload/system/library/log.php
*/
class Log
{
private $handle;
/**
* Constructor
*
* @param string $filename
*/
public function __construct($filename)
{
if (!stripos($filename, '.log')) {
$filename .= '.log';
}
$filePath = DIR_LOGS . $filename;
if (!file_exists($filePath)) {
create_dir($filePath);
}
$this->handle = fopen(DIR_LOGS . $filename, 'a');
}
/**
*
*
* @param string|array $messages
*/
public function write(...$messages)
{
foreach ($messages as $message) {
if (PHP_SAPI == 'cli') {
d($message);
}
fwrite($this->handle, date('Y-m-d H:i:s') . ' - ' . print_r($message, true) . "\n");
}
}
public function __destruct()
{
fclose($this->handle);
Arguments
"fopen(/www/wwwroot/jewelryshop/upload/system/storage/logs/action.log): Failed to open stream: Permission denied"
/www/wwwroot/jewelryshop/upload/system/library/log.php
*/
class Log
{
private $handle;
/**
* Constructor
*
* @param string $filename
*/
public function __construct($filename)
{
if (!stripos($filename, '.log')) {
$filename .= '.log';
}
$filePath = DIR_LOGS . $filename;
if (!file_exists($filePath)) {
create_dir($filePath);
}
$this->handle = fopen(DIR_LOGS . $filename, 'a');
}
/**
*
*
* @param string|array $messages
*/
public function write(...$messages)
{
foreach ($messages as $message) {
if (PHP_SAPI == 'cli') {
d($message);
}
fwrite($this->handle, date('Y-m-d H:i:s') . ' - ' . print_r($message, true) . "\n");
}
}
public function __destruct()
{
fclose($this->handle);
/www/wwwroot/jewelryshop/upload/vqmod/vqcache/vq2-system_engine_action.php
* @param string $route
*/
public function __construct($route) {
$this->id = $route;
$parts = explode('/', preg_replace('/[^a-zA-Z0-9_\/]/', '', (string)$route));
// Break apart the route
while ($parts) {
$file = DIR_APPLICATION . 'controller/' . implode('/', $parts) . '.php';
if (is_file($file)) {
$this->route = implode('/', $parts);
break;
} else {
$this->method = array_pop($parts);
}
}
$this->logger = new \Log('action');
}
/**
*
*
* @return string
*
*/
public function getId() {
return $this->id;
}
/**
*
*
* @param object $registry
* @param array $args
*/
public function execute($registry, array $args = array()) {
// Stop any magical methods being called
/www/wwwroot/jewelryshop/upload/system/framework.php
if ($config->has('library_autoload')) {
foreach ($config->get('library_autoload') as $value) {
$loader->library($value);
}
}
// Model Autoload
if ($config->has('model_autoload')) {
foreach ($config->get('model_autoload') as $value) {
$loader->model($value);
}
}
// Route
$route = new Router($registry);
// Pre Actions
if ($config->has('action_pre_action')) {
foreach ($config->get('action_pre_action') as $value) {
$route->addPreAction(new Action($value));
}
}
// Dispatch
$route->dispatch(new Action($config->get('action_router')), new Action($config->get('action_error')));
// Output
$response->output();
/www/wwwroot/jewelryshop/upload/vqmod/vqcache/vq2-system_startup.php
// Engine
require_once(\VQMod::modCheck(modification(DIR_SYSTEM . 'engine/action.php'), DIR_SYSTEM . 'engine/action.php'));
require_once(\VQMod::modCheck(modification(DIR_SYSTEM . 'engine/controller.php'), DIR_SYSTEM . 'engine/controller.php'));
require_once(\VQMod::modCheck(modification(DIR_SYSTEM . 'engine/event.php'), DIR_SYSTEM . 'engine/event.php'));
require_once(\VQMod::modCheck(modification(DIR_SYSTEM . 'engine/router.php'), DIR_SYSTEM . 'engine/router.php'));
require_once(\VQMod::modCheck(modification(DIR_SYSTEM . 'engine/loader.php'), DIR_SYSTEM . 'engine/loader.php'));
require_once(\VQMod::modCheck(modification(DIR_SYSTEM . 'engine/model.php'), DIR_SYSTEM . 'engine/model.php'));
require_once(\VQMod::modCheck(modification(DIR_SYSTEM . 'engine/registry.php'), DIR_SYSTEM . 'engine/registry.php'));
require_once(\VQMod::modCheck(modification(DIR_SYSTEM . 'engine/proxy.php'), DIR_SYSTEM . 'engine/proxy.php'));
require_once(\VQMod::modCheck(DIR_SYSTEM . 'engine/admin_controller.php'));
// Helper
require_once(\VQMod::modCheck(DIR_SYSTEM . 'helper/general.php'));
require_once(\VQMod::modCheck(DIR_SYSTEM . 'helper/utf8.php'));
require_once(\VQMod::modCheck(DIR_SYSTEM . 'helper/device.php'));
require_once(\VQMod::modCheck(DIR_SYSTEM . 'helper/functions.php'));
require_once(\VQMod::modCheck(DIR_SYSTEM . 'helper/illuminate.php'));
function start($application_config) {
require_once(\VQMod::modCheck(DIR_SYSTEM . 'framework.php'));
}
Arguments
"/www/wwwroot/jewelryshop/upload/system/framework.php"
/www/wwwroot/jewelryshop/upload/index.php
// Configuration
define("FRONT_ROOT", getcwd());
if (is_file(FRONT_ROOT . '/config.php')) {
require_once(FRONT_ROOT . '/config.php');
}
// Install
if (!defined('DIR_APPLICATION')) {
header('Location: install/index.php');
exit;
}
// VirtualQMOD
require_once('./vqmod/vqmod.php');
VQMod::bootup();
// VQMODDED Startup
require_once(VQMod::modCheck(DIR_SYSTEM . 'startup.php'));
start('catalog');