} } echo "</ul>" . $strFixProblemsAfter . "<br><br></div>"; } echo "</td></tr></table>"; break; case 3: // Administrator account echo "<form name='settingsform' method='post' action='install.php' onSubmit='return phpAds_formCheck(this);'>"; echo "<br><br><table border='0' cellpadding='0' cellspacing='0' width='100%'><tr><td valign='top'>"; echo "<img src='images/install-admin.gif'></td><td width='100%' valign='top'>"; echo "<br><span class='tab-s'>" . $strAdministratorAccount . "</span><br>"; echo "<img src='images/break-el.gif' width='100%' height='1' vspace='8'>"; echo "<span class='install'>" . $strInstallMessageAdmin . "</td></tr></table><br><br>"; phpAds_ShowBreak(); phpAds_ShowSettings(array(array('text' => $strSpecifyAdmin, 'items' => array(array('type' => 'text', 'name' => 'admin_fullname', 'text' => $strAdminFullName, 'size' => 35, 'req' => true), array('type' => 'break'), array('type' => 'text', 'name' => 'company_name', 'text' => $strCompanyName, 'size' => 35), array('type' => 'break'), array('type' => 'text', 'name' => 'admin_email', 'text' => $strAdminEmail, 'size' => 35, 'check' => 'email', 'req' => true), array('type' => 'break'), array('type' => 'select', 'name' => 'language', 'text' => $strLanguage, 'items' => phpAds_AvailableLanguages()), array('type' => 'break', 'size' => 'full'), array('type' => 'text', 'name' => 'admin', 'text' => $strUsername, 'size' => 25, 'req' => true), array('type' => 'break'), array('type' => 'password', 'name' => 'admin_pw', 'text' => $strNewPassword, 'size' => 25, 'req' => true), array('type' => 'break'), array('type' => 'password', 'name' => 'admin_pw2', 'text' => $strRepeatPassword, 'size' => 25, 'check' => 'compare:admin_pw', 'req' => true))), array('text' => $strSpecifyLocaton, 'items' => array(array('type' => 'text', 'name' => 'url_prefix', 'text' => $strUrlPrefix, 'size' => 35, 'check' => 'url', 'req' => true)))), $errormessage); break; case 4: // Database settings echo "<form name='settingsform' method='post' action='install.php' onSubmit='return phpAds_formCheck(this);'>"; echo "<br><br><table border='0' cellpadding='0' cellspacing='0' width='100%'><tr><td valign='top'>"; echo "<img src='images/install-database.gif'></td><td width='100%' valign='top'>"; echo "<br><span class='tab-s'>" . $strDatabasePage . "</span><br>"; echo "<img src='images/break-el.gif' width='100%' height='1' vspace='8'>"; echo "<span class='install'>" . $strInstallMessageDatabase . "</td></tr></table><br><br>"; phpAds_ShowBreak(); phpAds_ShowSettings(array(array('text' => $strDatabaseSettings, 'items' => array(array('type' => 'checkbox', 'name' => 'dblocal', 'text' => $strDbLocal, 'req' => true), array('type' => 'break'), array('type' => 'text', 'name' => 'dbhost', 'text' => $strDbHost, 'req' => true), array('type' => 'break'), array('type' => 'text', 'name' => 'dbport', 'text' => $strDbPort, 'depends' => 'dblocal==false'), array('type' => 'break'), array('type' => 'text', 'name' => 'dbuser', 'text' => $strDbUser, 'req' => true), array('type' => 'break'), array('type' => 'password', 'name' => 'dbpassword', 'text' => $strDbPassword), array('type' => 'break'), array('type' => 'text', 'name' => 'dbname', 'text' => $strDbName, 'req' => true))), array('text' => $strAdvancedSettings, 'items' => array(array('type' => 'text', 'name' => 'table_prefix', 'text' => $strTablesPrefix, 'req' => true), array('type' => 'break', 'visible' => phpAds_tableTypesSupported), array('type' => 'select', 'name' => 'table_type', 'text' => $strTablesType, 'items' => phpAds_getTableTypes(), 'visible' => phpAds_tableTypesSupported)))), $errormessage); break; case 5: // Admin settings if (!isset($fatal) || !count($fatal)) {
echo "<td colspan='1'><img src='images/break-l.gif' height='1' width='200' vspace='6'></td><td><img src='images/spacer.gif' height='1' width='100%'></tr>"; // Contact echo "<tr><td width='30'> </td><td width='200'>" . $strContact . "</td><td>"; echo "<input onBlur='phpAds_formUpdate(this);' class='flat' type='text' name='contact' size='35' style='width:350px;' value='" . phpAds_htmlQuotes($affiliate['contact']) . "' tabindex='" . $tabindex++ . "'>"; echo "</td></tr><tr><td><img src='images/spacer.gif' height='1' width='30'></td>"; echo "<td colspan='1'><img src='images/break-l.gif' height='1' width='200' vspace='6'></td><td><img src='images/spacer.gif' height='1' width='100%'></tr>"; // Email echo "<tr><td width='30'> </td><td width='200'>" . $strEMail . "</td><td>"; echo "<input onBlur='phpAds_formUpdate(this);' class='flat' type='text' name='email' size='35' style='width:350px;' value='" . phpAds_htmlQuotes($affiliate['email']) . "' tabindex='" . $tabindex++ . "'>"; echo "</td></tr><tr><td><img src='images/spacer.gif' height='1' width='30'></td>"; echo "<td colspan='1'><img src='images/break-l.gif' height='1' width='200' vspace='6'></td><td><img src='images/spacer.gif' height='1' width='100%'></tr>"; // Language echo "<tr><td width='30'> </td><td width='200'>" . $strLanguage . "</td><td>"; echo "<select name='language' tabindex='" . $tabindex++ . "'>"; echo "<option value='' SELECTED>" . $strDefault . "</option>\n"; $languages = phpAds_AvailableLanguages(); while (list($k, $v) = each($languages)) { if (isset($affiliate['language']) && $affiliate['language'] == $k) { echo "<option value='{$k}' selected>{$v}</option>\n"; } else { echo "<option value='{$k}'>{$v}</option>\n"; } } echo "</select></td></tr><tr><td><img src='images/spacer.gif' height='1' width='30'></td>"; echo "<td colspan='1'><img src='images/break-l.gif' height='1' width='200' vspace='6'></td><td><img src='images/spacer.gif' height='1' width='100%'></tr>"; // Public? echo "<tr><td width='30'> </td><td colspan='2'>"; echo "<input type='hidden' name='publiczones_old' value='" . $affiliate['publiczones'] . "'>"; echo "<input type='checkbox' name='publiczones' value='t'" . ($affiliate['publiczones'] == 't' ? ' CHECKED' : '') . " tabindex='" . $tabindex++ . "'> "; echo $strMakePublisherPublic; echo "</td></tr>";
echo "<li>" . $fatal[$r] . "</li>"; } echo "</ul>" . $strFixProblemsAfter . "<br><br></div>"; } echo "</td></tr></table>"; break; case 1: // Language selection echo "<form name='settingsform' method='post' action='install.php' onSubmit='return phpAds_formCheck(this);'>"; echo "<br><br><table border='0' cellpadding='0' cellspacing='0' width='100%'><tr><td valign='top'>"; echo "<img src='images/install-welcome.gif'></td><td width='100%' valign='top'>"; echo "<br><span class='tab-s'>" . $strInstallWelcome . " " . $phpAds_version_readable . "</span><br>"; echo "<img src='images/break-el.gif' width='100%' height='1' vspace='8'>"; echo "<span class='install'>" . $strInstallMessage . "</td></tr></table><br><br>"; phpAds_ShowBreak(); phpAds_ShowSettings(array(array('text' => $strChooseInstallLanguage, 'items' => array(array('type' => 'select', 'name' => 'language', 'text' => $strLanguage, 'items' => phpAds_AvailableLanguages())))), $errormessage); break; case 2: // Database settings echo "<form name='settingsform' method='post' action='install.php' onSubmit='return phpAds_formCheck(this);'>"; echo "<br><br><table border='0' cellpadding='0' cellspacing='0' width='100%'><tr><td valign='top'>"; echo "<img src='images/install-welcome.gif'></td><td width='100%' valign='top'>"; echo "<br><span class='tab-s'>" . $strInstallWelcome . " " . $phpAds_version_readable . "</span><br>"; echo "<img src='images/break-el.gif' width='100%' height='1' vspace='8'>"; echo "<span class='install'>" . $strInstallMessage . "</td></tr></table><br><br>"; phpAds_ShowBreak(); phpAds_ShowSettings(array(array('text' => $strDatabaseSettings, 'items' => array(array('type' => 'text', 'name' => 'dbhost', 'text' => $strDbHost, 'req' => true), array('type' => 'break'), array('type' => 'text', 'name' => 'dbport', 'text' => $strDbPort, 'req' => true), array('type' => 'break'), array('type' => 'text', 'name' => 'dbuser', 'text' => $strDbUser, 'req' => true), array('type' => 'break'), array('type' => 'password', 'name' => 'dbpassword', 'text' => $strDbPassword, 'req' => true), array('type' => 'break'), array('type' => 'text', 'name' => 'dbname', 'text' => $strDbName, 'req' => true))), array('text' => $strAdvancedSettings, 'items' => array(array('type' => 'text', 'name' => 'table_prefix', 'text' => $strTablesPrefix, 'req' => true), array('type' => 'break', 'visible' => phpAds_tableTypesSupported), array('type' => 'select', 'name' => 'table_type', 'text' => $strTablesType, 'items' => phpAds_getTableTypes(), 'visible' => phpAds_tableTypesSupported)))), $errormessage); break; case 3: // Admin settings echo "<form name='settingsform' method='post' action='install.php' onSubmit='return phpAds_formCheck(this);'>";
if (isset($message)) { phpAds_ShowMessage($message); } phpAds_PageHeader("5.1"); if (phpAds_isUser(phpAds_Admin)) { phpAds_ShowSections(array("5.1", "5.3", "5.4", "5.2", "5.5")); } elseif (phpAds_isUser(phpAds_Agency)) { phpAds_ShowSections(array("5.1")); } phpAds_SettingsSelection("admin"); /*********************************************************/ /* Cache settings fields and get help HTML Code */ /*********************************************************/ $unique_users = array(); $res = phpAds_dbQuery("SELECT LOWER(clientusername) as used" . " FROM " . $phpAds_config['tbl_clients'] . " WHERE clientusername != ''"); while ($row = phpAds_dbFetchArray($res)) { $unique_users[] = $row['used']; } $res = phpAds_dbQuery("SELECT LOWER(username) as used FROM " . $phpAds_config['tbl_affiliates'] . " WHERE username != ''"); while ($row = phpAds_dbFetchArray($res)) { $unique_users[] = $row['used']; } $settings = array(array('text' => $strLoginCredentials, 'items' => array(array('type' => 'text', 'name' => 'admin', 'text' => $strAdminUsername, 'check' => 'unique', 'unique' => $unique_users), array('type' => 'break'), array('type' => 'password', 'name' => 'pwold', 'text' => $strOldPassword), array('type' => 'break'), array('type' => 'password', 'name' => 'pw', 'text' => $strNewPassword, 'depends' => 'pwold!=""'), array('type' => 'break'), array('type' => 'password', 'name' => 'pw2', 'text' => $strRepeatPassword, 'depends' => 'pwold!=""', 'check' => 'compare:pw'))), array('text' => $strBasicInformation, 'items' => array(array('type' => 'text', 'name' => 'admin_fullname', 'text' => $strAdminFullName, 'size' => 35), array('type' => 'break'), array('type' => 'text', 'name' => 'admin_email', 'text' => $strAdminEmail, 'size' => 35, 'check' => 'email'), array('type' => 'break'), array('type' => 'text', 'name' => 'company_name', 'text' => $strCompanyName, 'size' => 35))), array('text' => $strPreferences, 'items' => array(array('type' => 'select', 'name' => 'language', 'text' => $strLanguage, 'items' => phpAds_AvailableLanguages()), array('type' => 'break'), array('type' => 'select', 'name' => 'updates_frequency', 'text' => $strAdminCheckUpdates, 'items' => array('0' => $strAdminCheckEveryLogin, '1' => $strAdminCheckDaily, '7' => $strAdminCheckWeekly, '30' => $strAdminCheckMonthly, '-1' => $strAdminCheckNever)), array('type' => 'break'), array('type' => 'checkbox', 'name' => 'admin_novice', 'text' => $strAdminNovice), array('type' => 'break'), array('type' => 'checkbox', 'name' => 'userlog_email', 'text' => $strUserlogEmail), array('type' => 'checkbox', 'name' => 'userlog_priority', 'text' => $strUserlogPriority), array('type' => 'checkbox', 'name' => 'userlog_autoclean', 'text' => $strUserlogAutoClean)))); /*********************************************************/ /* Main code */ /*********************************************************/ phpAds_ShowSettings($settings, $errormessage); /*********************************************************/ /* HTML framework */ /*********************************************************/ phpAds_PageFooter();
/*********************************************************/ /* HTML framework */ /*********************************************************/ phpAds_PrepareHelp(); if (isset($message)) { phpAds_ShowMessage($message); } phpAds_PageHeader("5.1"); phpAds_ShowSections(array("5.1", "5.3", "5.4", "5.2")); phpAds_SettingsSelection("admin"); /*********************************************************/ /* Cache settings fields and get help HTML Code */ /*********************************************************/ $unique_users = array(); $res = phpAds_dbQuery("SELECT LOWER(clientusername) as used FROM " . $phpAds_config['tbl_clients'] . " WHERE clientusername != ''"); while ($row = phpAds_dbFetchArray($res)) { $unique_users[] = $row['used']; } $res = phpAds_dbQuery("SELECT LOWER(username) as used FROM " . $phpAds_config['tbl_affiliates'] . " WHERE username != ''"); while ($row = phpAds_dbFetchArray($res)) { $unique_users[] = $row['used']; } $settings = array(array('text' => $strLoginCredentials, 'items' => array(array('type' => 'text', 'name' => 'admin', 'text' => $strAdminUsername, 'check' => 'unique', 'unique' => $unique_users), array('type' => 'break'), array('type' => 'password', 'name' => 'pwold', 'text' => $strOldPassword), array('type' => 'break'), array('type' => 'password', 'name' => 'pw', 'text' => $strNewPassword, 'depends' => 'pwold!=""'), array('type' => 'break'), array('type' => 'password', 'name' => 'pw2', 'text' => $strRepeatPassword, 'depends' => 'pwold!=""', 'check' => 'compare:pw'))), array('text' => $strBasicInformation, 'items' => array(array('type' => 'text', 'name' => 'admin_fullname', 'text' => $strAdminFullName, 'size' => 35), array('type' => 'break'), array('type' => 'text', 'name' => 'admin_email', 'text' => $strAdminEmail, 'size' => 35, 'check' => 'email'), array('type' => 'break'), array('type' => 'text', 'name' => 'company_name', 'text' => $strCompanyName, 'size' => 35))), array('text' => $strPreferences, 'items' => array(array('type' => 'select', 'name' => 'language', 'text' => $strLanguage, 'items' => phpAds_AvailableLanguages()), array('type' => 'break'), array('type' => 'checkbox', 'name' => 'admin_novice', 'text' => $strAdminNovice), array('type' => 'break'), array('type' => 'checkbox', 'name' => 'userlog_email', 'text' => $strUserlogEmail), array('type' => 'checkbox', 'name' => 'userlog_priority', 'text' => $strUserlogPriority), array('type' => 'checkbox', 'name' => 'userlog_autoclean', 'text' => $strUserlogAutoClean), array('type' => 'break'), array('type' => 'checkbox', 'name' => 'auto_maintenance', 'text' => $strEnableAutoMaintenance))), array('text' => "Openads Sync", 'items' => array(array('type' => 'checkbox', 'name' => 'updates_enabled', 'text' => $strAdminCheckUpdates), array('type' => 'break'), array('type' => 'checkbox', 'name' => 'updates_dev_builds', 'text' => $strAdminCheckDevBuilds, 'depends' => 'updates_enabled==true')))); /*********************************************************/ /* Main code */ /*********************************************************/ phpAds_ShowSettings($settings, $errormessage); /*********************************************************/ /* HTML framework */ /*********************************************************/ phpAds_PageFooter();