/home/runcloud/webapps/manage-crm/system/helpers/bin.php
$x = ORM::for_table($table)
->raw_query(
'SHOW COLUMNS FROM `' . $table . '` LIKE \'' . $column . '\''
)
->first();
if ($x) {
return true;
} else {
return false;
}
}
/**
* @param $template
* @param array $vars
* @throws SmartyException
*/
function view($template, $vars = [])
{
if(!str_starts_with($template, '../')) {
// Replace . with / in template name
$template = str_replace('.', '/', $template);
}
global $ui;
global $app_theme;
foreach ($vars as $key => $value) {
$ui->assign($key, $value);
}
if (file_exists('ui/theme/' . $app_theme . '/' . $template . '.tpl')) {
$ui->display($template . '.tpl');
} else {
$ui->display('../default/' . $template . '.tpl');
}
exit;
}
function view_render($template, $vars = [])
{
Arguments
"str_starts_with(): Passing null to parameter #1 ($haystack) of type string is deprecated"
/home/runcloud/webapps/manage-crm/system/helpers/bin.php
$x = ORM::for_table($table)
->raw_query(
'SHOW COLUMNS FROM `' . $table . '` LIKE \'' . $column . '\''
)
->first();
if ($x) {
return true;
} else {
return false;
}
}
/**
* @param $template
* @param array $vars
* @throws SmartyException
*/
function view($template, $vars = [])
{
if(!str_starts_with($template, '../')) {
// Replace . with / in template name
$template = str_replace('.', '/', $template);
}
global $ui;
global $app_theme;
foreach ($vars as $key => $value) {
$ui->assign($key, $value);
}
if (file_exists('ui/theme/' . $app_theme . '/' . $template . '.tpl')) {
$ui->display($template . '.tpl');
} else {
$ui->display('../default/' . $template . '.tpl');
}
exit;
}
function view_render($template, $vars = [])
{
/home/runcloud/webapps/manage-crm/system/controllers/default/client/app.php
<?php
if (!defined('APP_RUN')) {
exit('No direct access allowed');
}
require APP_SYSTEM_PATH . '/controllers/default/client/init.php';
switch ($action) {
case '':
case 'home':
\view(get_theme_file('home'), [
'type' => 'client_auth',
'admin' => User::admin(),
]);
break;
case 'iview':
Event::trigger('client/iview/');
$has_login_token = Contact::hasLoginToken();
$today = date('Y-m-d H:i:s');
$id = $routes['2'];
$d = ORM::for_table('sys_invoices')->find($id);
if ($d) {
$token = $routes['3'];
$render = route(4, 'invoice');
$token = str_replace('token_', '', $token);
$vtoken = $d['vtoken'];
if ($token != $vtoken) {
echo 'Sorry Token does not match!';
exit();
}
$items = ORM::for_table('sys_invoiceitems')
->where('invoiceid', $id)
->order_by_asc('id')
/home/runcloud/webapps/manage-crm/system/controllers/client.php
<?php
/*
|--------------------------------------------------------------------------
| Controller
|--------------------------------------------------------------------------
|
*/
if (!defined('APP_RUN')) {
exit('No direct access allowed');
}
$route_controller_directory =
$config['route_controller_directory'] ?? 'default';
require 'system/controllers/' . $route_controller_directory . '/client/app.php';
Arguments
"/home/runcloud/webapps/manage-crm/system/controllers/default/client/app.php"
/home/runcloud/webapps/manage-crm/system/helpers/bootstrap.php
]);
$ui->assign(
'append_to_the_head_in_the_base_layout',
$append_to_the_head_in_the_base_layout
);
require APP_SYSTEM_PATH . '/helpers/plugged.php';
// variable initializations
$xheader = '';
$xfooter = '';
$xjq = '';
$pl_path = '';
//
$sys_render = 'system/controllers/' . $handler . '.php';
if (file_exists($sys_render)) {
include $sys_render;
} else {
$p1 = false;
$p2 = false;
if (isset($routes[0]) && $routes[0] != '') {
$p1 = true;
}
if (isset($routes[1]) && $routes[1] != '') {
$p2 = true;
}
if ($p1 && $p2) {
$dir = $routes[0];
$cont = $routes[1];
$path = 'apps/' . $dir . '/' . $cont . '.php';
$pl_path = 'apps/' . $dir . '/';
if (file_exists($path)) {
$_pd = 'apps/' . $dir;
Arguments
"/home/runcloud/webapps/manage-crm/system/controllers/client.php"
/home/runcloud/webapps/manage-crm/system/app.php
exit();
}
/*
|--------------------------------------------------------------------------
| To load composer autoload
|--------------------------------------------------------------------------
|
*/
require APP_BASE_PATH.'/vendor/autoload.php';
/*
|--------------------------------------------------------------------------
| Start the Application
|--------------------------------------------------------------------------
|
*/
require APP_SYSTEM_PATH.'/helpers/bootstrap.php';
Arguments
"/home/runcloud/webapps/manage-crm/system/helpers/bootstrap.php"
/home/runcloud/webapps/manage-crm/index.php
<?php
const APP_RUN = true;
const APP_BASE_PATH = __DIR__;
const APP_SYSTEM_PATH = __DIR__.'/system';
const APP_STORAGE_PATH = __DIR__.'/storage';
const APP_CACHE_PATH = APP_STORAGE_PATH.'/cache';
require APP_SYSTEM_PATH. '/app.php';
Arguments
"/home/runcloud/webapps/manage-crm/system/app.php"