Search:

# CWIS Developers Documentation

- Main Page
- Classes
- Files

- File List
- File Members

# SystemConfiguration.php

Go to the documentation of this file.

    00001 <?php
    00002
    00003 class SystemConfiguration {
    00004
    00005     # ---- PUBLIC INTERFACE --------------------------------------------------
    00006
    00007     # object constructor
    00008     function SystemConfiguration($DB = NULL)
    00009     {
    00010         $this->DB = new Database();
    00011     }
    00012
    00013     # data access methods
    00014     function TopLinkString($NewValue = DB_NOVALUE){  return $this->UpdateValue("TopLinkString", $NewValue);  }
    00015     function TopLinkBeginLetter($NewValue = DB_NOVALUE) {  return $this->UpdateValue("TopLinkBeginLetter", $NewValue);  }
    00016     function TopLinkEndLetter($NewValue = DB_NOVALUE) {  return $this->UpdateValue("TopLinkEndLetter", $NewValue);  }
    00017     function AdminEmail($NewValue = DB_NOVALUE) {  return $this->UpdateValue("AdminEmail", $NewValue);  }
    00018     function PasswordMailSubject($NewValue = DB_NOVALUE) {  return $this->UpdateValue("PasswordMailSubject", $NewValue);  }
    00019     function PasswordMailBody($NewValue = DB_NOVALUE) {  return $this->UpdateValue("PasswordMailBody", $NewValue);  }
    00020     function PasswordResetMailSubject($NewValue = DB_NOVALUE) {  return $this->UpdateValue("PasswordResetMailSubject", $NewValue);  }
    00021     function PasswordResetMailBody($NewValue = DB_NOVALUE) {  return $this->UpdateValue("PasswordResetMailBody", $NewValue);  }
    00022     function MailChangeMailSubject($NewValue = DB_NOVALUE) { return $this->UpdateValue("MailChangeMailSubject", $NewValue); }
    00023     function MailChangeMailBody($NewValue = DB_NOVALUE) { return $this->UpdateValue("MailChangeMailBody", $NewValue); }
    00024     function PortalName($NewValue = DB_NOVALUE) {  return $this->UpdateValue("PortalName", $NewValue);  }
    00025     function DefaultActiveUI($NewValue = DB_NOVALUE) {  return $this->UpdateValue("DefaultActiveUI", $NewValue);  }
    00026     function CurrentTheme($NewValue = DB_NOVALUE) {  return $this->UpdateValue("CurrentTheme", $NewValue);  }
    00027     function DefaultCharacterSet($NewValue = DB_NOVALUE) {  return $this->UpdateValue("DefaultCharacterSet", $NewValue);  }
    00028     function SearchTermsRequired($NewValue = DB_NOVALUE) {  return $this->UpdateValue("SearchTermsRequired", $NewValue);  }
    00029     function AnnouncementsEnabled($NewValue = DB_NOVALUE) {  return $this->UpdateValue("AnnouncementsEnabled", $NewValue);  }
    00030     function ForumsEnabled($NewValue = DB_NOVALUE) {  return $this->UpdateValue("ForumsEnabled", $NewValue);  }
    00031     function AllowMultipleUIsEnabled($NewValue = DB_NOVALUE) {  return $this->UpdateValue("AllowMultipleUIsEnabled", $NewValue);  }
    00032     function ResourceLaunchesNewWindowEnabled($NewValue = DB_NOVALUE) {  return $this->UpdateValue("ResourceLaunchesNewWindowEnabled", $NewValue);  }
    00033     function UserAgentsEnabled($NewValue = DB_NOVALUE) {  return $this->UpdateValue("UserAgentsEnabled", $NewValue);  }
    00034     function ResourceRatingsEnabled($NewValue = DB_NOVALUE) {  return $this->UpdateValue("ResourceRatingsEnabled", $NewValue);  }
    00035     function ResourceCommentsEnabled($NewValue = DB_NOVALUE) {  return $this->UpdateValue("ResourceCommentsEnabled", $NewValue);  }
    00036     function AccessibilityWizardEnabled($NewValue = DB_NOVALUE) {  return $this->UpdateValue("AccessibilityWizardEnabled", $NewValue);  }
    00037     function ReleaseFlagApproved($NewValue = DB_NOVALUE) {  return $this->UpdateValue("ReleaseFlagApproved", $NewValue);  }
    00038     function SearchDBEnabled($NewValue = DB_NOVALUE) {  return $this->UpdateValue("SearchDBEnabled", $NewValue);  }
    00039     function RecommenderDBEnabled($NewValue = DB_NOVALUE) {  return $this->UpdateValue("RecommenderDBEnabled", $NewValue);  }
    00040     function OAISQEnabled($NewValue = DB_NOVALUE) {  return $this->UpdateValue("OAISQEnabled", $NewValue);  }
    00041     function NumAnnounceOnHomePage($NewValue = DB_NOVALUE) {  return $this->UpdateValue("NumAnnounceOnHomePage", $NewValue);  }
    00042     function NumResourcesOnHomePage($NewValue = DB_NOVALUE) {  return $this->UpdateValue("NumResourcesOnHomePage", $NewValue);  }
    00043     function LegalNotice($NewValue = DB_NOVALUE) {  return $this->UpdateValue("LegalNotice", $NewValue);  }
    00044     function NumClassesPerBrowsePage($NewValue = DB_NOVALUE)
    00045     {
    00046         # if new classes per browse page has been specified
    00047         if ($NewValue !== DB_NOVALUE &&
    00048             $NewValue != $this->UpdateValue("NumClassesPerBrowsePage",DB_NOVALUE))
    00049         {
    00050             # clear all classification links
    00051             $this->TopLinkString("");
    00052             $this->DB->Query("UPDATE Classifications SET LinkString=''");
    00053         }
    00054         return $this->UpdateValue("NumClassesPerBrowsePage", $NewValue);
    00055     }
    00056     function NumColumnsPerBrowsePage($NewValue = DB_NOVALUE) {  return $this->UpdateValue("NumColumnsPerBrowsePage", $NewValue);  }
    00057     function BrowsingFieldId($NewValue = DB_NOVALUE) {  return $this->UpdateValue("BrowsingFieldId", $NewValue);  }
    00058     function OaiIdDomain($NewValue = DB_NOVALUE) {  return $this->UpdateValue("OaiIdDomain", $NewValue);  }
    00059     function OaiIdPrefix($NewValue = DB_NOVALUE) {  return $this->UpdateValue("OaiIdPrefix", $NewValue);  }
    00060     function OaiEarliestDate($NewValue = DB_NOVALUE) {  return $this->UpdateValue("OaiEarliestDate", $NewValue);  }
    00061     function OaiDateGranularity($NewValue = DB_NOVALUE) {  return $this->UpdateValue("OaiDateGranularity", $NewValue);  }
    00062     function SiteKeywords($NewValue = DB_NOVALUE) { return $this->UpdateValue("SiteKeywords", $NewValue); }
    00063     function AboutText($NewValue = DB_NOVALUE) { return $this->UpdateValue("AboutText", $NewValue); }
    00064
    00065     function ContactName($NewValue = DB_NOVALUE) { return $this->UpdateValue("ContactName", $NewValue); }
    00066     function ContactEmail($NewValue = DB_NOVALUE) { return $this->UpdateValue("ContactEmail", $NewValue); }
    00067     function Organization($NewValue = DB_NOVALUE) { return $this->UpdateValue("Organization", $NewValue); }
    00068     function OrganizationType($NewValue = DB_NOVALUE) { return $this->UpdateValue("OrganizationType", $NewValue); }
    00069     function SiteType($NewValue = DB_NOVALUE) { return $this->UpdateValue("SiteType", $NewValue); }
    00070     function OkayToListSite($NewValue = DB_NOVALUE) { return $this->UpdateValue("OkayToListSite", $NewValue); }
    00071     function LastRegisteredOn($NewValue = DB_NOVALUE) { return $this->UpdateValue("LastRegisteredOn", $NewValue); }
    00072     function AddAWStatsScript($NewValue = DB_NOVALUE) { return $this->UpdateValue("AddAWStatsScript", $NewValue); }
    00073     function AddGoogleAnalytics($NewValue = DB_NOVALUE) { return $this->UpdateValue("AddGoogleAnalytics", $NewValue); }
    00074     function GoogleAnalyticsCode($NewValue = DB_NOVALUE) { return $this->UpdateValue("GoogleAnalyticsCode", $NewValue); }
    00075     function DisplayLimitsByDefault($NewValue = DB_NOVALUE) { return $this->UpdateValue("DisplayLimitsByDefault", $NewValue); }
    00076
    00077     function LogoFileName() {  return $this->UpdateValue("LogoFileName",DB_NOVALUE, "UIStyleConfiguration");  }
    00078     function LogoAltText() {  return $this->UpdateValue("LogoAltText",DB_NOVALUE, "UIStyleConfiguration");  }
    00079     function LogoWidth() {  return $this->UpdateValue("LogoWidth",DB_NOVALUE,"UIStyleConfiguration");  }
    00080     function LogoHeight() {  return $this->UpdateValue("LogoHeight",DB_NOVALUE,"UIStyleCOnfiguration");  }
    00081
    00082     function HasRegistered() {  return strlen($this->UpdateValue("LastRegisteredOn",DB_NOVALUE)) ? TRUE : FALSE;  }
    00083
    00084     function TitleField($NewValue = DB_NOVALUE) { return $this->UpdateValue("TitleField", $NewValue); }
    00085     function DescriptionField($NewValue = DB_NOVALUE) { return $this->UpdateValue("DescriptionField", $NewValue); }
    00086     function UrlField($NewValue = DB_NOVALUE) { return $this->UpdateValue("UrlField", $NewValue); }
    00087     function ScreenshotField($NewValue = DB_NOVALUE) { return $this->UpdateValue("ScreenshotField", $NewValue); }
    00088
    00089     function SecureLogin($NewValue = DB_NOVALUE) { return $this->UpdateValue("SecureLogin", $NewValue); }
    00090
    00091
    00092     function Value($FieldName, $NewValue = DB_NOVALUE)
    00093             {  return $this->UpdateValue($FieldName, $NewValue);  }
    00094
    00095     # ---- PRIVATE INTERFACE -------------------------------------------------
    00096
    00097     private $DB;
    00098     private $DBFields;
    00099     private function UpdateValue($FieldName, $NewValue, $Table="SystemConfiguration")
    00100     {
    00101         return $this->DB->UpdateValue($Table, $FieldName,
    00102                                       $NewValue, NULL, $this->DBFields);
    00103     }
    00104 }
    00105
    00106 ?>