本文整理汇总了PHP中dolibarr_del_const函数的典型用法代码示例。如果您正苦于以下问题:PHP dolibarr_del_const函数的具体用法?PHP dolibarr_del_const怎么用?PHP dolibarr_del_const使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dolibarr_del_const函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Form
$form = new Form($db);
$typeconst=array('yesno','texte','chaine');
if ($_POST['action'] == 'update' || $_POST['action'] == 'add')
{
if (! dolibarr_set_const($db, $_POST['constname'], $_POST['constvalue'], $typeconst[$_POST['consttype']], 0, isset($_POST['constnote']) ? $_POST['constnote'] : '',$conf->entity));
{
print $db->error();
}
}
if ($_GET['action'] == 'delete')
{
if (! dolibarr_del_const($db, $_GET['constname'],$conf->entity));
{
print $db->error();
}
}
/*
* View
*/
llxHeader();
$html=new Form($db);
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
示例2: header
}
/*
* Action
*/
if (preg_match('/set_(.*)/', $action, $reg)) {
$code = $reg[1];
if (dolibarr_set_const($db, $code, 1, 'chaine', 0, '', $conf->entity) > 0) {
header("Location: " . $_SERVER["PHP_SELF"]);
exit;
} else {
dol_print_error($db);
}
}
if (preg_match('/del_(.*)/', $action, $reg)) {
$code = $reg[1];
if (dolibarr_del_const($db, $code, $conf->entity) > 0) {
header("Location: " . $_SERVER["PHP_SELF"]);
exit;
} else {
dol_print_error($db);
}
}
/*
* View
*/
$help_url = '';
llxHeader('', $langs->trans("ECMSetup"), $help_url);
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
print load_fiche_titre($langs->trans("ECMSetup"), $linkback, 'title_setup');
print '<br>';
print '<table class="noborder" width="100%">';
示例3: purgeSessions
/*
* Actions
*/
// Purge sessions
if ($action == 'confirm_purge' && $confirm == 'yes' && $user->admin) {
$res = purgeSessions(session_id());
}
// Lock new sessions
if ($action == 'confirm_lock' && $confirm == 'yes' && $user->admin) {
if (dolibarr_set_const($db, 'MAIN_ONLY_LOGIN_ALLOWED', $user->login, 'text', 1, 'Logon is restricted to a particular user', 0) < 0) {
dol_print_error($db);
}
}
// Unlock new sessions
if ($action == 'confirm_unlock' && $user->admin) {
if (dolibarr_del_const($db, 'MAIN_ONLY_LOGIN_ALLOWED', -1) < 0) {
dol_print_error($db);
}
}
/*
* View
*/
llxHeader();
$form = new Form($db);
$userstatic = new User($db);
$usefilter = 0;
$listofsessions = listOfSessions();
$num = count($listofsessions);
print_barre_liste($langs->trans("Sessions"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num, 0, 'setup');
$savehandler = ini_get("session.save_handler");
$savepath = ini_get("session.save_path");
示例4: dol_print_error
dol_print_error($db);
}
}
}
if ($_POST["delete"])
{
if(isset($_POST["numero_entry"]))
{
$db->begin();
$result1=dolibarr_del_const($db,"ftp_port_" . $_POST["numero_entry"],$conf->entity);
if ($result1) $result2=dolibarr_del_const($db,"ftp_server_" . $_POST["numero_entry"],$conf->entity);
if ($result2) $result3=dolibarr_del_const($db,"ftp_user_" . $_POST["numero_entry"],$conf->entity);
if ($result3) $result4=dolibarr_del_const($db,"ftp_password_" . $_POST["numero_entry"],$conf->entity);
if ($result4) $result5=dolibarr_del_const($db,"ftp_name_" . $_POST["numero_entry"],$conf->entity);
if ($result1 && $result2 && $result3 && $result4 && $result5)
{
$db->commit();
//$mesg='<div class="ok">'.$langs->trans("Success").'</div>';
header("Location: ftpclient.php");
exit;
}
else
{
$db->rollback();
dol_print_error($db);
}
}
}
示例5: deleteTab
private function deleteTab()
{
global $db, $conf, $user;
dol_include_once('/core/lib/admin.lib.php');
dolibarr_del_const($db, 'MAIN_MODULE_QUERY_TABS_' . $this->getId());
}
示例6: setEventMessages
if (!$error) {
$db->commit();
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
$db->rollback();
setEventMessages($langs->trans("Error"), null, 'errors');
}
} else {
if ($action == 'set') {
$ret = addDocumentModel($value, $type, $label, $scandir);
} else {
if ($action == 'del') {
$ret = delDocumentModel($value, $type);
if ($ret > 0) {
if ($conf->global->FICHEINTER_ADDON_PDF == "{$value}") {
dolibarr_del_const($db, 'FICHEINTER_ADDON_PDF', $conf->entity);
}
}
} else {
if ($action == 'setdoc') {
if (dolibarr_set_const($db, "FICHEINTER_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) {
// La constante qui a ete lue en avant du nouveau set
// on passe donc par une variable pour avoir un affichage coherent
$conf->global->FICHEINTER_ADDON_PDF = $value;
}
// On active le modele
$ret = delDocumentModel($value, $type);
if ($ret > 0) {
$ret = addDocumentModel($value, $type, $label, $scandir);
}
} else {
示例7: header
header("Location: " . $_SERVER["PHP_SELF"]);
exit;
} else {
if ($action == 'disable_hidemenu') {
dolibarr_del_const($db, "MAIN_MENU_HIDE_UNAUTHORIZED", $conf->entity);
header("Location: " . $_SERVER["PHP_SELF"]);
exit;
}
}
if ($action == 'activate_layoutmenu') {
dolibarr_set_const($db, "MAIN_MENU_USE_JQUERY_LAYOUT", '1', 'chaine', 0, '', $conf->entity);
header("Location: " . $_SERVER["PHP_SELF"]);
exit;
} else {
if ($action == 'disable_layoutmenu') {
dolibarr_del_const($db, "MAIN_MENU_USE_JQUERY_LAYOUT", $conf->entity);
header("Location: " . $_SERVER["PHP_SELF"]);
exit;
}
}
/*
* View
*/
llxHeader('', $langs->trans("Setup"));
print_fiche_titre($langs->trans("Menus"), '', 'setup');
$h = 0;
$head[$h][0] = DOL_URL_ROOT . "/admin/menus.php";
$head[$h][1] = $langs->trans("MenuHandlers");
$head[$h][2] = 'handler';
$h++;
$head[$h][0] = DOL_URL_ROOT . "/admin/menus/index.php";
示例8: define
}
if (!defined('NOREQUIREHOOK')) {
define('NOREQUIREHOOK', '1');
}
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
$action = GETPOST('action', 'alpha');
$name = GETPOST('name', 'alpha');
/*
* View
*/
// Ajout directives pour resoudre bug IE
//header('Cache-Control: Public, must-revalidate');
//header('Pragma: public');
//top_htmlhead("", "", 1); // Replaced with top_httphead. An ajax page does not need html header.
top_httphead();
print '<!-- Ajax page called with url ' . $_SERVER["PHP_SELF"] . '?' . $_SERVER["QUERY_STRING"] . ' -->' . "\n";
// Registering the location of boxes
if (!empty($action) && !empty($name)) {
$entity = GETPOST('entity', 'int');
$value = GETPOST('value') ? GETPOST('value') : 1;
if ($user->admin) {
if ($action == 'set') {
dolibarr_set_const($db, $name, $value, 'chaine', 0, '', $entity);
} else {
if ($action == 'del') {
dolibarr_del_const($db, $name, $entity);
}
}
}
}
示例9: dol_syslog
$mesg = '<font class="error">' . $module->error . '</font>';
dol_syslog($module->error, LOG_ERR);
}
} else {
$mesg = '<font class="error">' . $langs->trans("ErrorModuleNotFound") . '</font>';
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
}
}
if ($action == 'set') {
$ret = addDocumentModel($value, $type, $label, $scandir);
}
if ($action == 'del') {
$ret = delDocumentModel($value, $type);
if ($ret > 0) {
if ($conf->global->LIVRAISON_ADDON_PDF == "{$value}") {
dolibarr_del_const($db, 'LIVRAISON_ADDON_PDF', $conf->entity);
}
}
}
if ($action == 'setdoc') {
if (dolibarr_set_const($db, "LIVRAISON_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) {
// La constante qui a ete lue en avant du nouveau set
// on passe donc par une variable pour avoir un affichage coherent
$conf->global->LIVRAISON_ADDON_PDF = $value;
}
// On active le modele
$ret = delDocumentModel($value, $type);
if ($ret > 0) {
$ret = addDocumentModel($value, $type, $label, $scandir);
}
}
示例10: dolibarr_del_const
/*
* Actions
*/
if ($_POST["action"] == "save" && empty($_POST["cancel"]))
{
$i=0;
$db->begin();
foreach ($triggers as $trigger)
{
$param='MAIN_AGENDA_ACTIONAUTO_'.$trigger['code'];
//print "param=".$param." - ".$_POST[$param];
if (! empty($_POST[$param])) dolibarr_set_const($db,$param,$_POST[$param],'chaine',0,'',$conf->entity);
else dolibarr_del_const($db,$param,$conf->entity);
}
$db->commit();
$mesg = '<font class="ok">'.$langs->trans("SetupSaved").'</font>';
}
/**
* Affichage du formulaire de saisie
*/
llxHeader();
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
示例11: dolibarr_del_const
exit;
} else {
if ($_GET["action"] == 'disable_sending') {
dolibarr_del_const($db, "MAIN_SUBMODULE_EXPEDITION", $conf->entity);
Header("Location: confexped.php");
exit;
} else {
if ($_GET["action"] == 'activate_delivery') {
dolibarr_set_const($db, "MAIN_SUBMODULE_EXPEDITION", "1", 'chaine', 0, '', $conf->entity);
// We must also enable this
dolibarr_set_const($db, "MAIN_SUBMODULE_LIVRAISON", "1", 'chaine', 0, '', $conf->entity);
Header("Location: confexped.php");
exit;
} else {
if ($_GET["action"] == 'disable_delivery') {
dolibarr_del_const($db, "MAIN_SUBMODULE_LIVRAISON", $conf->entity);
Header("Location: confexped.php");
exit;
}
}
}
}
/*
* Affiche page
*/
$dir = DOL_DOCUMENT_ROOT . "/includes/modules/expedition/";
$html = new Form($db);
llxHeader("", "");
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
print_fiche_titre($langs->trans("SendingsSetup"), $linkback, 'setup');
print '<br>';
示例12: setEventMessage
$error++;
}
if (!$error) {
setEventMessage($langs->trans("SetupSaved"));
} else {
setEventMessage($langs->trans("Error"), 'errors');
}
} else {
if ($action == 'set') {
$ret = addDocumentModel($value, $type, $label, $scandir);
} else {
if ($action == 'del') {
$ret = delDocumentModel($value, $type);
if ($ret > 0) {
if ($conf->global->FACTURE_ADDON_PDF == "{$value}") {
dolibarr_del_const($db, 'FACTURE_ADDON_PDF', $conf->entity);
}
}
} else {
if ($action == 'setdoc') {
if (dolibarr_set_const($db, "FACTURE_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) {
// La constante qui a ete lue en avant du nouveau set
// on passe donc par une variable pour avoir un affichage coherent
$conf->global->FACTURE_ADDON_PDF = $value;
}
// On active le modele
$ret = delDocumentModel($value, $type);
if ($ret > 0) {
$ret = addDocumentModel($value, $type, $label, $scandir);
}
} else {
示例13: accessforbidden
$langs->load("admin");
$langs->load("workflow");
if (!$user->admin) {
accessforbidden();
}
$action = GETPOST('action', 'alpha');
/*
* Actions
*/
if (preg_match('/set(.*)/', $action, $reg)) {
if (!dolibarr_set_const($db, $reg[1], 1, 'chaine', 0, '', $conf->entity) > 0) {
dol_print_error($db);
}
}
if (preg_match('/del(.*)/', $action, $reg)) {
if (!dolibarr_del_const($db, $reg[1], $conf->entity) > 0) {
dol_print_error($db);
}
}
/*
* View
*/
llxHeader('', $langs->trans("WorkflowSetup"), '');
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
print load_fiche_titre($langs->trans("WorkflowSetup"), $linkback, 'title_setup');
print $langs->trans("WorkflowDesc") . '<br>';
print "<br>";
// List of workflow we can enable
print '<table class="noborder" width="100%">' . "\n";
print '<tr class="liste_titre">' . "\n";
print ' <td>' . $langs->trans("Description") . '</td>';
示例14: accessforbidden
*/
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formbarcode.class.php';
$langs->load("admin");
if (!$user->admin) {
accessforbidden();
}
$action = GETPOST('action', 'alpha');
/*
* Actions
*/
if ($action == 'setbarcodeproducton') {
$res = dolibarr_set_const($db, "BARCODE_PRODUCT_ADDON_NUM", GETPOST('value'), 'chaine', 0, '', $conf->entity);
} elseif ($action == 'setbarcodeproductoff') {
$res = dolibarr_del_const($db, "BARCODE_PRODUCT_ADDON_NUM", $conf->entity);
}
if ($action == 'setcoder') {
$coder = GETPOST('coder', 'alpha');
$code_id = GETPOST('code_id', 'alpha');
$sqlp = "UPDATE " . MAIN_DB_PREFIX . "c_barcode_type";
$sqlp .= " SET coder = '" . $coder . "'";
$sqlp .= " WHERE rowid = " . $code_id;
$sqlp .= " AND entity = " . $conf->entity;
$resql = $db->query($sqlp);
if (!$resql) {
dol_print_error($db);
}
} else {
if ($action == 'update') {
if (GETPOST('submit_GENBARCODE_LOCATION')) {
示例15: delDocumentModel
$conf->global->DON_ADDON_MODEL = $value;
}
// On active le modele
$ret = delDocumentModel($value, $type);
if ($ret > 0) {
$ret = addDocumentModel($value, $type, $label, $scandir);
}
} else {
if ($action == 'set') {
$ret = addDocumentModel($value, $type, $label, $scandir);
} else {
if ($action == 'del') {
$ret = delDocumentModel($value, $type);
if ($ret > 0) {
if ($conf->global->DON_ADDON_MODEL == "{$value}") {
dolibarr_del_const($db, 'DON_ADDON_MODEL', $conf->entity);
}
}
}
}
}
}
// Options
if ($action == 'set_DONATION_ACCOUNTINGACCOUNT') {
$account = GETPOST('DONATION_ACCOUNTINGACCOUNT');
// No alpha here, we want exact string
$res = dolibarr_set_const($db, "DONATION_ACCOUNTINGACCOUNT", $account, 'chaine', 0, '', $conf->entity);
if (!$res > 0) {
$error++;
}
if (!$error) {