function GetPropertiesFromDataSet($DataSet, &$Context)
 {
     $this->Title = FormatHtmlStringInline(ForceString($DataSet["Name"], ""));
     $this->Link = PrependString("http://", AppendFolder(agDOMAIN, "comments.php?DiscussionID=" . ForceInt($DataSet["DiscussionID"], 0)));
     $this->Id = $this->Link;
     $this->Published = FixDate(@$DataSet["DateCreated"]);
     $this->Updated = FixDate(@$DataSet["DateLastActive"]);
     $this->AuthorName = FormatHtmlStringInline(ForceString($DataSet["AuthUsername"], ""));
     $this->AuthorUrl = PrependString("http://", AppendFolder(agDOMAIN, "account.php?u=" . ForceInt($DataSet["AuthUserID"], 0)));
     $this->Content = $this->RemoveHtml(ForceString(@$DataSet["Body"], ""));
     $this->Summary = SliceString($this->Content, 200);
     $this->Summary = str_replace("\r\n", " ", $this->Content);
     $this->Content = str_replace("\r\n", "<br />", $this->Content);
     if (agUSE_CATEGORIES) {
         $this->Category = FormatStringForDisplay(ForceString($DataSet["Category"], ""), true);
         $this->CategoryLink = "http://" . AppendFolder(agDOMAIN, "?CategoryID=" . ForceInt($DataSet["CategoryID"], 0));
     }
 }
function GetRequestUri()
{
    global $Configuration;
    $Host = ForceString($_SERVER['HTTP_HOST'], '');
    if ($Host != '') {
        $Host = PrependString($Configuration['HTTP_METHOD'] . '://', $Host);
    }
    $Path = @$_SERVER['REQUEST_URI'];
    // If the path wasn't provided in the REQUEST_URI variable, let's look elsewhere for it
    if ($Path == '') {
        $Path = @$_SERVER['HTTP_X_REWRITE_URL'];
    }
    // Some servers use this instead
    // If the path still wasn't found, let's try building it with other variables
    if ($Path == '') {
        $Path = @$_SERVER['SCRIPT_NAME'];
        $Path .= @$_SERVER['QUERY_STRING'] == '' ? '' : '?' . @$_SERVER['QUERY_STRING'];
    }
    $FullPath = ConcatenatePath($Host, $Path);
    return FormatStringForDisplay($FullPath);
}
 function GetPropertiesFromForm()
 {
     $this->UserID = ForceIncomingInt("u", 0);
     $this->RoleID = ForceIncomingInt("RoleID", 0);
     $this->StyleID = ForceIncomingInt("StyleID", 0);
     $this->CustomStyle = ForceIncomingString("CustomStyle", "");
     $this->Name = ForceIncomingString("Name", "");
     $this->FirstName = ForceIncomingString("FirstName", "");
     $this->LastName = ForceIncomingString("LastName", "");
     $this->ShowName = ForceIncomingBool("ShowName", 0);
     $this->Email = ForceIncomingString("Email", "");
     $this->UtilizeEmail = ForceIncomingBool("UtilizeEmail", 0);
     $this->Password = ForceIncomingString("Password", "");
     $this->Icon = PrependString("http://", ForceIncomingString("Icon", ""));
     $this->Picture = PrependString("http://", ForceIncomingString("Picture", ""));
     $this->AgreeToTerms = ForceIncomingBool("AgreeToTerms", 0);
     $this->ReadTerms = ForceIncomingBool("ReadTerms", 0);
     $this->Discovery = ForceIncomingString("Discovery", "");
     $this->OldPassword = ForceIncomingString("OldPassword", "");
     $this->NewPassword = ForceIncomingString("NewPassword", "");
     $this->ConfirmPassword = ForceIncomingString("ConfirmPassword", "");
     // Retrieve attributes from the form
     $AttributeCount = ForceIncomingInt("LabelValuePairCount", 0);
     $Label = "";
     $Value = "";
     for ($i = 0; $i < $AttributeCount; $i++) {
         $Label = ForceIncomingString("Label" . ($i + 1), "");
         $Label = strip_tags($Label);
         $Label = str_replace("\\\"", "", $Label);
         $Value = ForceIncomingString("Value" . ($i + 1), "");
         $Value = strip_tags($Value);
         $Value = str_replace("\\\"", "", $Value);
         if ($Label != "" && $Value != "") {
             $this->Attributes[] = array("Label" => $Label, "Value" => $Value);
         }
     }
 }
 function GetPropertiesFromForm()
 {
     $this->UserID = ForceIncomingInt('u', 0);
     $this->RoleID = ForceIncomingInt('RoleID', 0);
     $this->StyleID = ForceIncomingInt('StyleID', 0);
     $this->CustomStyle = ForceIncomingString('CustomStyle', '');
     $this->Name = ForceIncomingString('Name', '');
     $this->FirstName = ForceIncomingString('FirstName', '');
     $this->LastName = ForceIncomingString('LastName', '');
     $this->ShowName = ForceIncomingBool('ShowName', 0);
     $this->Email = ForceIncomingString('Email', '');
     $this->UtilizeEmail = ForceIncomingBool('UtilizeEmail', 0);
     $this->Password = ForceIncomingString('Password', '');
     $this->Icon = PrependString(array('http://', 'https://'), ForceIncomingString('Icon', ''));
     $this->Picture = PrependString(array('http://', 'https://'), ForceIncomingString('Picture', ''));
     $this->AgreeToTerms = ForceIncomingBool('AgreeToTerms', 0);
     $this->ReadTerms = ForceIncomingBool('ReadTerms', 0);
     $this->Discovery = ForceIncomingString('Discovery', '');
     $this->OldPassword = ForceIncomingString('OldPassword', '');
     $this->NewPassword = ForceIncomingString('NewPassword', '');
     $this->ConfirmPassword = ForceIncomingString('ConfirmPassword', '');
     // Retrieve attributes from the form
     $AttributeCount = ForceIncomingInt('LabelValuePairCount', 0);
     $Label = '';
     $Value = '';
     for ($i = 0; $i < $AttributeCount; $i++) {
         $Label = ForceIncomingString('Label' . ($i + 1), '');
         $Label = strip_tags($Label);
         $Label = str_replace("\\\"", "", $Label);
         $Value = ForceIncomingString("Value" . ($i + 1), "");
         $Value = strip_tags($Value);
         $Value = str_replace("\\\"", "", $Value);
         if ($Label != '' && $Value != '') {
             $this->Attributes[] = array('Label' => $Label, 'Value' => $Value);
         }
     }
 }
$Body = $Context->ObjectFactory->NewContextObject($Context, "Body");
$Foot = $Context->ObjectFactory->NewContextObject($Context, "Foot");
$PageEnd = $Context->ObjectFactory->NewContextObject($Context, "PageEnd");
// BUILD THE PAGE HEAD
// Every page will require some basic definitions for the header.
$Head->AddScript("./js/global.js");
$Head->AddScript("./js/vanilla.js");
$Head->AddScript("./js/data.js");
$Head->AddScript("./js/protect.js");
$Head->AddScript("./js/autocomplete.js");
$Head->AddScript("./js/sort.js");
$Head->AddScript("/egroupware/jscripts/tiny_mce/tiny_mce_src.js");
$Head->AddStyleSheet($Context->StyleUrl . "global.css", "screen");
$Head->AddStyleSheet("/egroupware/sitemgr/sitemgr-site/templates/rhuk_orange_smoothie/css/template_css.css", "screen");
$Head->AddStyleSheet($Context->StyleUrl . "global.handheld.css", "handheld");
$Head->AddString("<link rel=\"alternate\" type=\"application/atom+xml\" href=\"" . PrependString("http://", AppendFolder(agDOMAIN, "feeds/?Type=atom")) . "\" title=\"" . $Context->GetDefinition("Atom") . " " . $Context->GetDefinition("Feed") . "\" />");
$Head->AddString('<script language="javascript" type="text/javascript">
                  tinyMCE.init({
				theme : "advanced",
                                mode: "exact",
                                elements: "CommentBox",
				plugins : "table",
				entity_encoding: "raw",
				cleanup : false,
				content_css : "/egroupware/jscripts/tiny_mce/themes/advanced/vanilla.css",
				theme_advanced_buttons1_add : "forecolor,backcolor",
// 				add_form_submit_trigger : false,
// 				submit_patch : false,
                                force_br_newlines : true,
				theme_advanced_buttons3_add_before : "tablecontrols,separator",
				theme_advanced_styles : "Header 1=header1;Header 2=header2;Header 3=header3;Table Row=tableRow1",