public static function GetByAssoc($values)
 {
     $item = new TenantEnumeration();
     $item->ID = $values["enum_ID"];
     $item->Tenant = Tenant::GetByID($values["enum_TenantID"]);
     $item->Module = Module::GetByID($values["enum_ModuleID"]);
     $item->Name = $values["enum_Name"];
     $item->Description = $values["enum_Description"];
     return $item;
 }
Esempio n. 2
0
 public static function GetByAssoc($values)
 {
     $item = new TenantProperty();
     $item->ID = $values["property_ID"];
     $item->Tenant = Tenant::GetByID($values["property_TenantID"]);
     $item->Name = $values["property_Name"];
     $item->Description = $values["property_Description"];
     $item->DataType = DataType::GetByID($values["property_DataTypeID"]);
     $item->DefaultValue = $item->DataType->Decode($values["property_DefaultValue"]);
     return $item;
 }
Esempio n. 3
0
 /**
  * Creates a new TenantObject object based on the given values from the database.
  * @param array $values
  * @return \PhoenixSNS\Objects\TenantObject based on the values of the fields in the given associative array
  */
 public static function GetByAssoc($values)
 {
     $item = new TenantObject();
     $item->ID = $values["object_ID"];
     $item->Tenant = Tenant::GetByID($values["object_TenantID"]);
     $item->Module = Module::GetByID($values["object_ModuleID"]);
     $item->ParentObject = TenantObject::GetByID($values["object_ParentObjectID"]);
     $item->DefaultProperty = TenantObjectProperty::GetByID($values["object_DefaultPropertyID"]);
     $item->Name = $values["object_Name"];
     return $item;
 }
Esempio n. 4
0
                    $failed = true;
                }
            }
        }
        $user = User::Create($_POST["TenantManager_UserName"], $_POST["TenantManager_Password"]);
        if ($user == null) {
            global $MySQL;
            Failure("Could not create user '" . $_POST["TenantManager_UserName"] . "'");
            Message("Database returned error " . $MySQL->errno . ": " . $MySQL->error);
            $failed = true;
        }
        $tenant = Tenant::Create($_POST["Application_DefaultTenant"], "The default tenant for PhoenixSNS.");
        $tablefilepath = dirname(__FILE__) . "/TenantObjects/*.inc.php";
        $tablefiles = glob($tablefilepath);
        foreach ($tablefiles as $tablefile) {
            $tenant = Tenant::GetByID(1);
            require $tablefile;
        }
        require dirname(__FILE__) . "/DefaultTenant.inc.php";
        ?>
				</table>
				<?php 
        if (!$failed) {
            echo "<script type=\"text/javascript\">window.location.href='" . System::ExpandRelativePath("~/") . "';</script>";
            return true;
        }
        return true;
    }
    $page = new SetupPage();
    $page->BeginContent();
    ?>
 /**
  * Creates a new TenantObjectProperty object based on the given values from the database.
  * @param array $values
  * @return \PhoenixSNS\Objects\TenantObjectProperty based on the values of the fields in the given associative array
  */
 public static function GetByAssoc($values)
 {
     $item = new TenantObjectProperty();
     $item->ID = $values["property_ID"];
     $item->Tenant = Tenant::GetByID($values["property_TenantID"]);
     $item->ParentObject = TenantObject::GetByID($values["property_ObjectID"]);
     $item->Name = $values["property_Name"];
     $item->Description = $values["property_Description"];
     $item->DataType = DataType::GetByID($values["property_DataTypeID"]);
     $item->DefaultValue = $values["property_DefaultValue"];
     $item->Required = $values["property_IsRequired"] == 1;
     $item->Enumeration = TenantEnumeration::GetByID($values["property_EnumerationID"]);
     $item->RequireChoiceFromEnumeration = $values["property_RequireChoiceFromEnumeration"] == 1;
     return $item;
 }
Esempio n. 6
0
 echo "<table class=\"ListView\">";
 echo "<tr>";
 echo "<th>Tenant</th>";
 echo "<th>Severity</th>";
 echo "<th>Message</th>";
 echo "<th>Timestamp</th>";
 echo "<th>IP Address</th>";
 echo "</tr>";
 $query = "SELECT * FROM " . System::$Configuration["Database.TablePrefix"] . "DebugMessages";
 $result = $MySQL->query($query);
 $count = $result->num_rows;
 for ($i = 0; $i < $count; $i++) {
     $values = $result->fetch_assoc();
     echo "<tr>";
     echo "<td>";
     $tenant = Tenant::GetByID($values["message_TenantID"]);
     if ($tenant != null) {
         echo "<a href=\"" . System::ExpandRelativePath("~/tenant/manage/" . $tenant->URL . "/") . "\">" . $tenant->URL . "</a>";
     }
     echo "</td>";
     echo "<td>";
     switch ($values["message_SeverityID"]) {
     }
     echo "</td>";
     echo "<td>";
     echo "<a href=\"" . System::ExpandRelativePath("~/system-log/" . $values["message_ID"]) . "\">";
     echo $values["message_Content"];
     echo "</a>";
     echo "</td>";
     echo "<td>";
     echo $values["message_Timestamp"];