function Show() { global $Tpl; global $FileName; global $PP; $Error = ""; if (!$this->Visible) { return; } $this->ds->open(); $RecordBlock = "Record " . $this->ComponentName; $Tpl->block_path = $RecordBlock; if ($this->EditMode) { if ($this->Errors->Count() == 0) { if ($this->ds->Errors->Count() > 0) { echo "Error in Record templates_pages"; } else { if ($this->ds->next_record()) { $this->ds->SetValues(); $this->page_name->SetValue($this->ds->page_name->GetValue()); $temppag = "process76PULL*PULL76" . $this->ds->page_html->GetValue(); $finalpage = ReplacePA($temppag, $PP); $this->page_html->SetValue($finalpage); if (!$this->FormSubmitted) { } } else { $this->EditMode = false; $this->ds->SetValues(); $this->page_name->SetValue($this->ds->page_name->GetValue()); $temppag = "process76PULL*PULL76" . $this->ds->page_html->GetValue(); $finalpage = ReplacePA($temppag, $PP); $this->page_html->SetValue($finalpage); } } } } $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow"); if ($this->FormSubmitted) { $Error .= $this->page_name->Errors->ToString(); $Error .= $this->page_html->Errors->ToString(); $Error .= $this->Errors->ToString(); $Error .= $this->ds->Errors->ToString(); $Tpl->SetVar("Error", $Error); $Tpl->Parse("Error", false); } $Tpl->SetVar("Action", $this->HTMLFormAction); $this->page_name->Show(); $this->page_html->Show(); $Tpl->parse("", false); $Tpl->block_path = ""; }
function mailnews($touser, $message, $subject, $EP) { global $now; global $accounting; global $charges; $newsubject = ReplacePA("76PULL*PULL76" . $subject, $EP); $newmessage = ReplacePA("76PULL*PULL76" . $message, $EP); $to = $touser; $subject = $newsubject; $message = $newmessage; $from = $now["siteemail"]; $fromname = $now["sitename"]; $additional_headers = "From: \"{$fromname}\" <{$from}>\nReply-To: {$from}"; @mail($to, $subject, $message, $additional_headers); }