예제 #1
0
function installPackage($package_name)
{
    $to_install = array($package_name => true);
    getDeps($package_name, $to_install);
    foreach ($to_install as $package => $x) {
        doInstall($package);
    }
}
예제 #2
0
function doStage2()
{
    if (doSystemChecks()) {
        displayWarnings();
        if (checkFields()) {
            if (checkConfigFiles()) {
                if (doInstall()) {
                    return true;
                }
            }
        }
        displayErrors();
        displayFields();
    } else {
        displayErrors();
    }
    return false;
}
예제 #3
0
// added for 3.5 sql_* wrapper
global $MYSQL_HANDLER;
//set the handler if different from mysql (or mysqli)
//$MYSQL_HANDLER = array('pdo','mysql');
if (!isset($MYSQL_HANDLER)) {
    $MYSQL_HANDLER = array('mysql', '');
}
include_once '../nucleus/libs/sql/' . $MYSQL_HANDLER[0] . '.php';
// end new for 3.5 sql_* wrapper
// check if mysql support is installed
// this check may not make sense, as is, in a version past 3.5x
if (!function_exists('mysql_query')) {
    _doError(_ERROR1);
}
if (postVar('action') == 'go') {
    doInstall();
} else {
    showInstallForm();
}
exit;
/*
 * Show the form for the installation settings
 */
function showInstallForm()
{
    // 0. pre check if all necessary files exist
    doCheckFiles();
    ?>
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
	<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
예제 #4
0
파일: step3.php 프로젝트: pvidali/BCSR-1
        mysql_query("INSERT INTO `" . HC_TblPrefix . "settingsmeta` (`PkID`, `Keywords`,`Description`,`Title`,`Sort`) VALUES ('15',NULL,NULL,NULL,'15')");
        mysql_query("INSERT INTO `" . HC_TblPrefix . "settingsmeta` (`PkID`, `Keywords`,`Description`,`Title`,`Sort`) VALUES ('16',NULL,NULL,NULL,'16')");
        echo '<b>Finished</b></div>';
        $status = doInstall($status, "Creating <i>" . HC_TblPrefix . "subscribers</i> table...", "CREATE TABLE " . HC_TblPrefix . "subscribers (PkID int(11) unsigned NOT NULL auto_increment,FirstName varchar(150) default NULL,LastName varchar(150) default NULL,Email varchar(75) default NULL,OccupationID int(11) default NULL,Zip varchar(10) default NULL,IsConfirm tinyint(3) unsigned NOT NULL default '0',GUID varchar(50) default NULL,AddedBy tinyint(3) unsigned NOT NULL default '0',RegisteredAt datetime default NULL,RegisterIP varchar(40) default NULL,`BirthYear` INT(4) DEFAULT '0' NOT NULL,`Gender` TINYINT(3) UNSIGNED DEFAULT '0' NOT NULL,`Referral` INT(11) UNSIGNED DEFAULT '0' NOT NULL,`Format` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',PRIMARY KEY (PkID)) Engine=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci");
        $status = doInstall($status, "Creating <i>" . HC_TblPrefix . "subscriberscategories</i> table...", "CREATE TABLE " . HC_TblPrefix . "subscriberscategories (UserID int(11) unsigned default NULL,CategoryID int(11) unsigned default NULL,KEY CategoryID (CategoryID),KEY UserID (UserID)) Engine=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci");
        $status = doInstall($status, "Creating <i>" . HC_TblPrefix . "subscribersgroups</i> table...", "CREATE TABLE `" . HC_TblPrefix . "subscribersgroups` (`UserID` INT(11) UNSIGNED NULL DEFAULT NULL,`GroupID` INT(11) UNSIGNED NULL DEFAULT NULL,INDEX `GroupID` (`GroupID`),INDEX `UserID` (`UserID`)) Engine=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci");
        $status = doInstall($status, "Creating <i>" . HC_TblPrefix . "templates</i> table...", "CREATE TABLE `" . HC_TblPrefix . "templates` (`PkID` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,`Name` VARCHAR(255) NULL DEFAULT '',`Content` LONGTEXT NULL DEFAULT NULL,`Header` MEDIUMTEXT NULL DEFAULT NULL,`Footer` MEDIUMTEXT NULL DEFAULT NULL,`Extension` VARCHAR(15) NULL DEFAULT NULL,`TypeID` INT(11) UNSIGNED NULL DEFAULT '1',`GroupBy` SMALLINT(3) UNSIGNED NOT NULL DEFAULT '1',`SortBy` SMALLINT(3) UNSIGNED NOT NULL DEFAULT '1',`CleanUp` MEDIUMTEXT NULL DEFAULT NULL, `DateFormat` TINYINT(3) NOT NULL DEFAULT '0', `IsActive` SMALLINT(3) UNSIGNED NOT NULL DEFAULT '0',PRIMARY KEY (`PkID`))Engine=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci");
        echo '<div style="padding-left:5px;line-height:15px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creating Default Export Templates...';
        mysql_query("INSERT INTO `" . HC_TblPrefix . "templates` (`PkID`, `Name`, `Content`, `Header`, `Footer`, `Extension`, `TypeID`, `GroupBy`, `SortBy`, `CleanUp`, `IsActive`) VALUES ('1', 'InDesign - By Category', '|N\r\n\$\$[category_unique]|N\r\n\$\$[date_unique]|N\r\n[event_title]. [event_time_start]. [loc_name], [loc_address], [loc_city]. [desc_notags] [contact_url] [event_cost]', '', '', '.txt', '1', '1', '0', '\$\$BLANK|N\r\n BLANK,\r\n BLANK.\r\nBLANK', '1')");
        mysql_query("INSERT INTO `" . HC_TblPrefix . "templates` (`PkID`, `Name`, `Content`, `Header`, `Footer`, `Extension`, `TypeID`, `GroupBy`, `SortBy`, `CleanUp`, `IsActive`) VALUES ('2', 'InDesign - By Date', '|N\r\n##[date_unique]|N\r\n##[category_unique]|N\r\n[event_title]. [event_time_start]. [loc_name], [loc_address], [loc_city]. [desc_notags] [contact_url] [event_cost]', '', '', '.txt', '1', '0', '1', '##BLANK|N\r\n BLANK,\r\n BLANK.\r\nBLANK', '1')");
        mysql_query("INSERT INTO `" . HC_TblPrefix . "templates` (`PkID`, `Name`, `Content`, `Header`, `Footer`, `Extension`, `TypeID`, `GroupBy`, `SortBy`, `CleanUp`, `IsActive`) VALUES ('3', 'CSV - All Variables', '[event_id],[event_title],[desc_notags],[event_date],[event_time_start],[event_time_end],[event_cost],[event_billboard],[contact_name],[contact_email],[contact_phone],[space],[space_used],[space_left],[loc_name],[loc_address],[loc_address2],[loc_city],[loc_region],[loc_postal],[loc_country]\r\n', 'event_id,event_title,event_desc,event_date,event_time_start,event_time_end,event_cost,event_billboard,contact_name,contact_email,contact_phone,space,space_used,space_left,loc_name,loc_address,loc_address2,loc_city,loc_region,loc_postal,loc_country\r\n', '\r\n/eof', '.csv', '1', '1', '1', 'BLANK', '1')");
        mysql_query("INSERT INTO `" . HC_TblPrefix . "templates` (`PkID`, `Name`, `Content`, `Header`, `Footer`, `Extension`, `TypeID`, `GroupBy`, `SortBy`, `CleanUp`, `IsActive`) VALUES ('4', 'Quark - Custom Layout', '\r\n@event head:[category_unique]\r\n@date head:[date_series]\r\n@calendar copy:[desc_notags]\r\n\r\n', '<Helios Output>', '', '.txt', '1', '3', '0', '@event head:BLANK\r\n@date head:BLANK\r\n@calendar copy:BLANK', '1')");
        mysql_query("INSERT INTO `" . HC_TblPrefix . "templates` (`PkID`, `Name`, `Content`, `Header`, `Footer`, `Extension`, `TypeID`, `GroupBy`, `SortBy`, `CleanUp`, `IsActive`) VALUES ('5', 'Custom XML File', '   <event id=\\'[event_id]\\'>\r\n      <description title=\\'[event_title]\\'>[desc_notags]</description>\r\n      <date format=\\'m/d/y\\'>[event_date]</date>\r\n      <time>\r\n         <start hours=\\'12\\' format=\\'H:M:S\\'>[event_time_start]</start>\r\n         <end hours=\\'12\\' format=\\'H:M:S\\'>[event_time_end]</end>\r\n      </time>\r\n      <cost currency=\\'\$\\'>[event_cost]</cost>\r\n      <contact>\r\n         <name>[contact_name]</name>\r\n         <email>[contact_email]</email>\r\n         <phone prefix=\\'+1\\'>[contact_phone]</phone>\r\n         <website url=\\'[contact_url]\\' />\r\n      </contact>\r\n      <location>\r\n         <name>[loc_name]</name>\r\n         <address>[loc_address]</address>\r\n         <address2>[loc_address2]</address2>\r\n         <city>[loc_city]</city>\r\n         <state>[loc_city]</state>\r\n         <zip>[loc_postal]</zip>\r\n         <country>[loc_country]</country>\r\n         <website url=\\'[loc_url]\\' />\r\n      </location>\r\n   </event>\r\n', '<?xml version=\\'1.0\\'?>\r\n<calendar>\r\n   <website url=\\'[cal_url]\\' />\r\n', '</calendar>', '.xml', '1', '1', '1', 'BLANK', '1')");
        mysql_query("INSERT INTO `" . HC_TblPrefix . "templates` (`PkID`, `Name`, `Content`, `Header`, `Footer`, `Extension`, `TypeID`, `GroupBy`, `SortBy`, `CleanUp`, `IsActive`) VALUES ('7', 'CSV - Import Format', '[event_title],[event_description],[event_cost],[event_date],[event_time_start],[event_time_end],NULL,NULL,[loc_name],[loc_address],[loc_address2],[loc_city],[loc_region],[loc_postal],[loc_country],[contact_name],[contact_email],[contact_phone],[event_billboard],[event_seriesid],[space],[space_left]\r\n', 'EventTitle,Description,Cost,EventDate,StartTime,EndTime,AllDay,LocationID,LocatioName,LocationAddress,LocationAddress2,LocationCity,LocationState,LocationZip,LocationCountry,ContactName,ContactEmail,ContactPhone,ContactURL,Billboard,SeriesID,Registration,SpaceAvailable\r\n', '/eof', '.csv', '1', '1', '1', NULL, '1')");
        echo '<b>Finished</b></div>';
        $status = doInstall($status, "Creating <i>" . HC_TblPrefix . "templatesnews</i> table...", "CREATE TABLE " . HC_TblPrefix . "templatesnews (PkID int(11) unsigned NOT NULL auto_increment,TemplateName varchar(250) default NULL,TemplateSource longtext,IsActive tinyint(3) unsigned NOT NULL default '0',`Mailings` INT(11) UNSIGNED NULL DEFAULT '0',PRIMARY KEY (PkID)) Engine=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci");
        $status = doInstall($status, "Creating <i>" . HC_TblPrefix . "users</i> table...", "CREATE TABLE `" . HC_TblPrefix . "users` (`PkID` int(11) unsigned NOT NULL AUTO_INCREMENT,`NetworkType` int(3) unsigned DEFAULT NULL,`NetworkName` varchar(200) DEFAULT NULL,`NetworkID` varchar(50) DEFAULT NULL,`Email` varchar(100) DEFAULT NULL,`SignIns` int(11) NOT NULL DEFAULT '0',`FirstSignIn` datetime DEFAULT NULL,`LastSignIn` datetime DEFAULT NULL,`LastIP` varchar(40) DEFAULT NULL,`Level` tinyint(3) unsigned NOT NULL DEFAULT '0',`IsBanned` tinyint(3) unsigned NOT NULL DEFAULT '0',`Categories` text,`Location` mediumtext,`Birthdate` date DEFAULT NULL,`Facebook` varchar(100) DEFAULT NULL,`Twitter` varchar(100) DEFAULT NULL,`GooglePlus` varchar(100) DEFAULT NULL,`IsPrivate` tinyint(3) unsigned NOT NULL DEFAULT '0',`Points` int(11) unsigned NOT NULL DEFAULT '0',`APIKey` varchar(100) DEFAULT NULL,`APIAccess` tinyint(3) unsigned NOT NULL DEFAULT '0',`APICnt` int(11) unsigned NOT NULL DEFAULT '0',PRIMARY KEY (`PkID`),KEY `NetworkID` (`NetworkID`),KEY `APIKey` (`APIKey`)) Engine=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci");
        echo '</fieldset>';
        if ($status == 0) {
            $_SESSION['done'] = true;
            echo '<input name="button" id="button" type="button" onclick="window.location.href=\'index.php?step=0\';return false;" value="Finish Setup" />';
        } else {
            echo '
					<div style="padding:15px;">

						Setup was unable to fully create your Helios Calendar database. Depending on which steps failed above you may wish to re-run this setup. Please verify the privileges granted to the MySQL user configured for Helios.
						<br /><br />You can <a href="' . CalRoot . '/setup/index.php?step=4">try this step again</a>, however, you should drop any partially created tables before doing so.
					</div>';
        }
    }
}