当前位置: 首页>>代码示例>>PHP>>正文


PHP dolibarr_install_syslog函数代码示例

本文整理汇总了PHP中dolibarr_install_syslog函数的典型用法代码示例。如果您正苦于以下问题:PHP dolibarr_install_syslog函数的具体用法?PHP dolibarr_install_syslog怎么用?PHP dolibarr_install_syslog使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了dolibarr_install_syslog函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: VALUES

		if (sizeof($couples) > 0 && $num > sizeof($couples))
		{
			$error=0;

			$db->begin();

			$sql="DELETE FROM ".MAIN_DB_PREFIX."categorie_association";
			dolibarr_install_syslog("upgrade: delete association sql=".$sql);
			$resqld=$db->query($sql);
			if ($resqld)
			{
				foreach($couples as $key => $val)
				{
					$sql ="INSERT INTO ".MAIN_DB_PREFIX."categorie_association(fk_categorie_mere,fk_categorie_fille)";
					$sql.=" VALUES(".$val['mere'].", ".$val['fille'].")";
					dolibarr_install_syslog("upgrade: insert association sql=".$sql);
					$resqli=$db->query($sql);
					if (! $resqli) $error++;
				}
			}

			if (! $error)
			{
				print '<tr><td>'.$langs->trans("RemoveDuplicates").'</td>';
				print '<td align="right">'.$langs->trans("Success").' ('.$num.'=>'.sizeof($couples).')</td></tr>';
				$db->commit();
			}
			else
			{
				print '<tr><td>'.$langs->trans("RemoveDuplicates").'</td>';
				print '<td align="right">'.$langs->trans("Failed").'</td></tr>';
开发者ID:remyyounes,项目名称:dolibarr,代码行数:31,代码来源:upgrade.php

示例2: dolibarr_install_syslog

	$force_install_databasepass = '';
if (!isset($force_install_databaserootlogin))
	$force_install_databaserootlogin = '';
if (!isset($force_install_databaserootpass))
	$force_install_databaserootpass = '';
// Now we load forced value from install.forced.php file.
$useforcedwizard = false;
$forcedfile = "./install.forced.php";
if ($conffile == "/etc/dolibarr/conf.php")
	$forcedfile = "/etc/dolibarr/install.forced.php";
if (@file_exists($forcedfile)) {
	$useforcedwizard = true;
	include_once($forcedfile);
}

dolibarr_install_syslog("Fileconf: Entering fileconf.php page");



/*
 * 	View
 */

pHeader($langs->trans("ConfigurationFile"), "etape1");

// Test if we can run a first install process
if (!is_writable($conffile)) {
	print $langs->trans("ConfFileIsNotWritable", $conffiletoshow);
	pFooter(1, $setuplang, 'jscheckparam');
	exit;
}
开发者ID:nrjacker4,项目名称:crm-php,代码行数:31,代码来源:fileconf.php

示例3: if

                        print "</td></tr>";
                    }
                    else if ($result < 0) print 'Error in '.get_class($object_instance).'.fetch of id'.$id.' ref='.$ref.', result='.$result.'<br>';
                }
            }
        }
    }
}

print '</table>';



if (empty($actiondone))
{
    print '<div class="error">'.$langs->trans("ErrorWrongParameters").'</div>';
}


print '<div class="center"><a href="../index.php?mainmenu=home&leftmenu=home&'.(isset($_POST["login"])?'&username='.urlencode($_POST["login"]):'').'">';
print $langs->trans("GoToDolibarr");
print '</a></div>';

dolibarr_install_syslog("--- repair: end");
pFooter(1,$setuplang);

if ($db->connected) $db->close();

// Return code if ran from command line
if (! $ok && isset($argv[1])) exit(1);
开发者ID:NoisyBoy86,项目名称:Dolibarr_test,代码行数:30,代码来源:repair.php

示例4: dol_escape_js

echo dol_escape_js($langs->transnoentities("YouAskToCreateDatabaseSoRootRequired"));
?>
');
	}
	// If create user asked
	else if (document.forminstall.db_create_user.checked == true && (document.forminstall.db_user_root.value == ''))
	{
		ok=false;
		alert('<?php 
echo dol_escape_js($langs->transnoentities("YouAskToCreateDatabaseUserSoRootRequired"));
?>
');
	}
	else if (document.forminstall.db_create_user.checked == true && (document.forminstall.db_user_root.value == ''))
	{
		ok=false;
		alert('<?php 
echo dol_escape_js($langs->transnoentities("YouAskToCreateDatabaseUserSoRootRequired"));
?>
');
	}

	return ok;
}
</script>


<?php 
// $db->close();	Not database connexion yet
dolibarr_install_syslog("--- fileconf: end");
pFooter($err, $setuplang, 'jscheckparam');
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:fileconf.php

示例5: dol_escape_js

	ok=true;

	//alert('<?php 
echo dol_escape_js($langs->transnoentities("NextStepMightLastALongTime"));
?>
');

	document.getElementById('nextbutton').style.visibility="hidden";
	document.getElementById('pleasewait').style.visibility="visible";

	return ok;
}
</script>

<?php 
dolibarr_install_syslog("--- step1: end");
pFooter($error, $setuplang, 'jsinfo', 1);
/**
 *  Create main file. No particular permissions are set by installer.
 *
 *  @param  string		$mainfile       Full path name of main file to generate/update
 *  @param	string		$main_dir		Full path name to main.inc.php file
 *  @return	void
 */
function write_main_file($mainfile, $main_dir)
{
    $fp = @fopen("{$mainfile}", "w");
    if ($fp) {
        clearstatcache();
        fputs($fp, '<?php' . "\n");
        fputs($fp, "// Wrapper to include main into htdocs\n");
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:step1.php

示例6:

	else
	{
		print "<tr><td>".$langs->trans("ErrorFailedToConnectToDatabase",$dolibarr_main_db_name)."</td><td align=\"right\">".$langs->trans("Error")."</td></tr>";
		dolibarr_install_syslog("repair: ".$langs->transnoentities("ErrorFailedToConnectToDatabase",$dolibarr_main_db_name));
		$ok=0;
	}
}

// Affiche version
if ($ok)
{
	$version=$db->getVersion();
	$versionarray=$db->getVersionArray();
	print '<tr><td>'.$langs->trans("ServerVersion").'</td>';
	print '<td align="right">'.$version.'</td></tr>';
	dolibarr_install_syslog("repair: ".$langs->transnoentities("ServerVersion")." : $version");
	//print '<td align="right">'.join('.',$versionarray).'</td></tr>';
}

// Force l'affichage de la progression
print '<tr><td colspan="2">'.$langs->trans("PleaseBePatient").'</td></tr>';
flush();


/*
 *	Load sql files
 */
if ($ok)
{
	if ($choix==1) $dir = "mysql/migration/";
	elseif ($choix==2) $dir = "pgsql/migration/";
开发者ID:remyyounes,项目名称:dolibarr,代码行数:31,代码来源:repair.php

示例7: dol_escape_js

	ok=true;

	//alert('<?php 
echo dol_escape_js($langs->transnoentities("NextStepMightLastALongTime"));
?>
');

	document.getElementById('nextbutton').style.visibility="hidden";
	document.getElementById('pleasewait').style.visibility="visible";

	return ok;
}
</script>

<?php 
dolibarr_install_syslog("--- install/etape1.php end", LOG_INFO);
pFooter($error, $setuplang, 'jsinfo', 1);
/**
 *  Create main file. No particular permissions are set by installer.
 *
 *  @param  string		$mainfile       Full path name of main file to generate/update
 *  @param	string		$main_dir		Full path name to main.inc.php file
 *  @return	void
 */
function write_main_file($mainfile, $main_dir)
{
    $fp = @fopen("{$mainfile}", "w");
    if ($fp) {
        clearstatcache();
        fputs($fp, '<?php' . "\n");
        fputs($fp, "// Wrapper to include main into htdocs\n");
开发者ID:ADDAdev,项目名称:Dolibarr,代码行数:31,代码来源:etape1.php

示例8: dolibarr_install_syslog

 }
 dolibarr_install_syslog("upgrade: result is num=" . $num . " count(couples)=" . count($couples));
 // If there is duplicates couples or child with two parents
 if (count($couples) > 0 && $num > count($couples)) {
     $error = 0;
     $db->begin();
     // We delete all
     $sql = "DELETE FROM " . MAIN_DB_PREFIX . "categorie_association";
     dolibarr_install_syslog("upgrade: delete association", LOG_DEBUG);
     $resqld = $db->query($sql);
     if ($resqld) {
         // And we insert only each record once
         foreach ($couples as $key => $val) {
             $sql = "INSERT INTO " . MAIN_DB_PREFIX . "categorie_association(fk_categorie_mere,fk_categorie_fille)";
             $sql .= " VALUES(" . $val['mere'] . ", " . $val['fille'] . ")";
             dolibarr_install_syslog("upgrade: insert association", LOG_DEBUG);
             $resqli = $db->query($sql);
             if (!$resqli) {
                 $error++;
             }
         }
     }
     if (!$error) {
         print '<tr><td>' . $langs->trans("RemoveDuplicates") . '</td>';
         print '<td align="right">' . $langs->trans("Success") . ' (' . $num . '=>' . count($couples) . ')</td></tr>';
         $db->commit();
     } else {
         print '<tr><td>' . $langs->trans("RemoveDuplicates") . '</td>';
         print '<td align="right">' . $langs->trans("Failed") . '</td></tr>';
         $db->rollback();
     }
开发者ID:ADDAdev,项目名称:Dolibarr,代码行数:31,代码来源:upgrade.php

示例9: confirm

            print '</table>';
            print '</div>';
        }
    }
}
print '<script type="text/javascript">

$("div#AShowChoices a").click(function() {

    $("div#navail_choices").toggle();

    if ($("div#navail_choices").css("display") == "none") {
        $(this).text("' . $langs->trans('ShowNotAvailableOptions') . '");
        $(this).parent().children("img").attr("src", "../theme/eldy/img/1downarrow.png");
    } else {
        $(this).text("' . $langs->trans('HideNotAvailableOptions') . '");
        $(this).parent().children("img").attr("src", "../theme/eldy/img/1uparrow.png");
    }

});

/*
$(".runupgrade").click(function() {
	return confirm("' . dol_escape_js($langs->transnoentitiesnoconv("WarningUpgrade"), 0, 1) . '");
});
*/

</script>';
dolibarr_install_syslog("--- check: end");
pFooter(true);
// Never display next button
开发者ID:TAASA,项目名称:Dolibarr-ERP-3.8.1,代码行数:31,代码来源:check.php

示例10: dolibarr_install_syslog

		dolibarr_install_syslog("copied file ".$conffile.".example into ".$conffile." done successfully.");
	}
	else
	{
		// If failed, we try to create an empty file
		dolibarr_install_syslog("failed to copy file ".$conffile.".example into ".$conffile.". We try to create it.", LOG_WARNING);

		$fp = @fopen($conffile, "w");
		if ($fp)
		{
			@fwrite($fp, '<?php');
			@fputs($fp,"\n");
			@fputs($fp,"?>");
			fclose($fp);
		}
		else dolibarr_install_syslog("failed to create a new file ".$conffile." into current dir ".getcwd().". Check permission.", LOG_ERR);
	}

	// First install, on ne peut pas upgrader
	$allowupgrade=0;
}



// Si fichier absent et n'a pu etre cree
if (! file_exists($conffile))
{
	print '<img src="../theme/eldy/img/error.png" alt="Error"> '.$langs->trans("ConfFileDoesNotExistsAndCouldNotBeCreated",$conffiletoshow);
	print "<br><br>";
	print $langs->trans("YouMustCreateWithPermission",$conffiletoshow);
	print "<br><br>";
开发者ID:nrjacker4,项目名称:crm-php,代码行数:31,代码来源:check.php

示例11: fwrite

                }
                // For backward compatibility
                fwrite($fp, "This is a lock file to prevent use of install pages (set with permission " . $force_install_lockinstall . ")");
                fclose($fp);
                @chmod($lockfile, octdec($force_install_lockinstall));
                $createlock = 1;
            }
        }
        if (empty($createlock)) {
            print '<br><div class="warning">' . $langs->trans("WarningRemoveInstallDir") . "</div>";
        }
        print "<br>";
        print '<div class="center"><a href="../index.php?mainmenu=home' . (isset($_POST["login"]) ? '&username=' . urlencode($_POST["login"]) : '') . '">';
        print $langs->trans("GoToDolibarr");
        print '</a></div>';
    } else {
        // If here MAIN_VERSION_LAST_UPGRADE is not empty
        print $langs->trans("VersionLastUpgrade") . ': <b><font class="ok">' . $conf->global->MAIN_VERSION_LAST_UPGRADE . '</font></b><br>';
        print $langs->trans("VersionProgram") . ': <b><font class="ok">' . DOL_VERSION . '</font></b>';
        print "<br>";
        print '<div class="center"><a href="../install/index.php">';
        print $langs->trans("GoToUpgradePage");
        print '</a></div>';
    }
} else {
    dol_print_error('', 'step5.php: unknown choice of action');
}
// Clear cache files
clearstatcache();
dolibarr_install_syslog("--- step5: Dolibarr setup finished");
pFooter(1, $setuplang);
开发者ID:TAASA,项目名称:Dolibarr-ERP-3.8.1,代码行数:31,代码来源:step5.php

示例12: include_once

 */

include_once("./inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");

$setuplang=isset($_POST["selectlang"])?$_POST["selectlang"]:(isset($_GET["selectlang"])?$_GET["selectlang"]:'auto');
$langs->setDefaultLang($setuplang);

$langs->load("install");

// Init "forced values" to nothing. "forced values" are used after an doliwamp install wizard.
$useforcedwizard=false;
if (file_exists("./install.forced.php")) { $useforcedwizard=true; include_once("./install.forced.php"); }
else if (file_exists("/etc/dolibarr/install.forced.php")) { $useforcedwizard=include_once("/etc/dolibarr/install.forced.php"); }

dolibarr_install_syslog("Licence: Entering licence.php page");


/*
 *	View
 */

pHeader($langs->trans("License"),"fileconf");

// Test if we can run a first install process
if (! is_writable($conffile))
{
    print $langs->trans("ConfFileIsNotWritable",$conffiletoshow);
    pFooter(1,$setuplang,'jscheckparam');
    exit;
}
开发者ID:remyyounes,项目名称:dolibarr,代码行数:31,代码来源:licence.php

示例13: run_sql

                    print '<tr><td colspan="2"><hr></td></tr>';
                    print '<tr><td class="nowrap">' . $langs->trans("ChoosedMigrateScript") . ' (external modules)</td><td align="right">' . $modulefileshort . '</td></tr>' . "\n";
                    // Run sql script
                    $okmodule = run_sql($modulefilelong, 0, '', 1);
                    // Note: Result of migration of external module should not decide if we continue migration of Dolibarr or not.
                }
            }
        }
    }
    print '</table>';
    if ($db->connected) {
        $db->close();
    }
}
if (empty($actiondone)) {
    print '<div class="error">' . $langs->trans("ErrorWrongParameters") . '</div>';
}
$ret = 0;
if (!$ok && isset($argv[1])) {
    $ret = 1;
}
dol_syslog("Exit " . $ret);
dolibarr_install_syslog("--- upgrade: end " . (!$ok && empty($_GET["ignoreerrors"]) || $dirmodule));
pFooter(!$ok && empty($_GET["ignoreerrors"]) || $dirmodule ? 2 : 0, $setuplang);
if ($db->connected) {
    $db->close();
}
// Return code if ran from command line
if ($ret) {
    exit($ret);
}
开发者ID:Albertopf,项目名称:prueba,代码行数:31,代码来源:upgrade.php

示例14: fwrite

                }
                // For backward compatibility
                fwrite($fp, "This is a lock file to prevent use of install pages (set with permission " . $force_install_lockinstall . ")");
                fclose($fp);
                @chmod($lockfile, octdec($force_install_lockinstall));
                $createlock = 1;
            }
        }
        if (empty($createlock)) {
            print '<br><div class="warning">' . $langs->trans("WarningRemoveInstallDir") . "</div>";
        }
        print "<br>";
        print '<center><a href="../index.php?mainmenu=home' . (isset($_POST["login"]) ? '&username=' . urlencode($_POST["login"]) : '') . '">';
        print $langs->trans("GoToDolibarr");
        print '</a></center>';
    } else {
        // If here MAIN_VERSION_LAST_UPGRADE is not empty
        print $langs->trans("VersionLastUpgrade") . ': <b><font class="ok">' . $conf->global->MAIN_VERSION_LAST_UPGRADE . '</font></b><br>';
        print $langs->trans("VersionProgram") . ': <b><font class="ok">' . DOL_VERSION . '</font></b>';
        print "<br>";
        print '<center><a href="../install/index.php">';
        print $langs->trans("GoToUpgradePage");
        print '</a></center>';
    }
} else {
    dol_print_error('', 'install/etape5.php Unknown choice of action');
}
// Clear cache files
clearstatcache();
dolibarr_install_syslog("--- install/etape5.php Dolibarr setup finished", LOG_INFO);
pFooter(1, $setuplang);
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:etape5.php

示例15: run_sql

                    print '<tr><td colspan="2"><hr></td></tr>';
                    print '<tr><td class="nowrap">' . $langs->trans("ChoosedMigrateScript") . ' (external modules)</td><td align="right">' . $modulefileshort . '</td></tr>' . "\n";
                    // Run sql script
                    $okmodule = run_sql($modulefilelong, 0, '', 1);
                    // Note: Result of migration of external module should not decide if we continue migration of Dolibarr or not.
                }
            }
        }
    }
    print '</table>';
    if ($db->connected) {
        $db->close();
    }
}
if (empty($actiondone)) {
    print '<div class="error">' . $langs->trans("ErrorWrongParameters") . '</div>';
}
$ret = 0;
if (!$ok && isset($argv[1])) {
    $ret = 1;
}
dol_syslog("Exit " . $ret);
dolibarr_install_syslog("--- upgrade: end");
pFooter(!$ok && empty($_GET["ignoreerrors"]) || $dirmodule, $setuplang);
if ($db->connected) {
    $db->close();
}
// Return code if ran from command line
if ($ret) {
    exit($ret);
}
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:upgrade.php


注:本文中的dolibarr_install_syslog函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。