Auto Load Code
Auto Load Code.
DbFace allows you creating your own API by PHP for public access. DbFace use CodeIgniter Framework to provide a flexible PHP development environment.
You will see all available cloud code you already created in the selected database connection.
Tap the “Create API Code” button to create a new API code.
You will find the cloud code public URL in the list page.
Cloud Code Alerts can be configured to run either on an interval or at a scheduled time.
To run a Cloud Code Alert on an interval, select the interval option and choose from every 10 minutes, 30 minutes, 1 hours, 4 hours, 12 hours, or 24 hours.
By selecting the ‘Schedule’ option, cloud code alerts can be set to run at a specific time in specific timezone.
You can change the timezone at config/config.inc.php file
$config['crontab_schedule_timezone'] = date_default_timezone_get();
You can find all the available timezone here.
You need to enable crontab to enable Cloud Code Alerts feature.
php index.php crontab crontab_key
The crontab_key can be found in config/config.inc.php
$config['crontab_execution_key'] = '6193rW3iTjXo7N3S27t2I2GA6OJjo03S';
Please modify the default crontab_execution_key, or other people can invoke the crontab if they know your dbface installation URL.
We recommend you run the cron application every 10 minutes.
sudo crontab -e
add
*/10 * * * * php /var/www/dbface/index.php cron 6193rW3iTjXo7N3S27t2I2GA6OJjo03S
Cloud Code Alerts can be disabled by turning off the “Enable Alerts” switch under the Cloud Code footer.
!!! tip “Please Notice” Cloud Code only be available on On-premises installation or Enterprise plan.
You can also create your own Smarty templates that can be used in Cloud Code or PHP Report.
!!! tip “Please Notice” Use {$ and } in templates. We already put predefined variables, parameters and other global variables into the smarty instance.
We already create $smarty variable and put all available variables into the smarty instance. You can also use $db variable that point to your current database connection.
$smarty->display('my-template.tpl');
$smarty->display('my-template.tpl');
As default, All scheduled jobs are executed by 10 minutes. You can drag the “Drag” icon to order the scheduled jobs.
/**
* Trigger function when user sign in DbFace successfully.
*
* @param $params
*
* @return bool
*/
function _trigger_login($params) {
return TRUE;
}
/**
* trigger function before user execute an application
*
* @param $params: appid, creatorid, userid
*/
function _trigger_pre_application($params) {
return TRUE;
}
/**
* trigger function after user execute an application
*
* @param $params: appid, creatorid, userid
*/
function _trigger_post_application($params) {
return FALSE;
}
You can define custom menu for viewers in DbFace by an editable YAML file.
DbFace modules are pure php applications that be able to installed in DbFace. You can install DbFace modules as DbFace menu items. So we can access these php applications in DbFace navigation system.
Auto Load Code.
DbFace Coding FAQs.
Jobs.
Managed DbFace.
Query Builder.
Query Stats.
Remote API Monitor.
Snapshots.
SQL Terminal.
Story board.
Table Row Action Script
A short lead description about this content page. It can be bold or italic and can be split over multiple paragraphs.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.