builder
|
| Posted: 05/02/2002, 9:21 PM |
|
I find a very interesting problem for CCS. If I have set the restriction to yes and assign the right for each group, the generated code will always wrong and return "Parse error: parse error in c:\htdocs\ccs\form_newcontact.php on line 68".
Although I suspect somewhere the { is missing may be I still can't figure this out. This happened to all the page if I have set the restriction property to yes and assign the right for the user group.
I have attached the code.
<?php
//Include Common Files @1-79AB8F4C
include("./Common.php");
include("./Template.php");
include("./Sorter.php");
include("./Navigator.php");
//End Include Common Files
Class clsRecordcontact { //contact Class @2-F6C66023
//Variables @2-62964ED1
// Public variables
var $ComponentName;
var $HTMLFormAction;
var $PressedButton;
var $Errors;
var $FormSubmitted;
var $Visible;
var $Recordset;
var $CCSEvents;
var $CCSEventResult;
var $ReadAllowed;
var $InsertAllowed;
var $UpdateAllowed;
var $DeleteAllowed;
var $DataSource;
var $EditMode;
var $ValidatingControls;
var $Controls;
// Class variables
var $contact_name;
var $contact_IC;
var $cust_id;
var $cust_idDataSource;
var $new_customer;
var $contact_type_id;
var $contact_type_idDataSource;
var $contact_mobile;
var $contact_office;
var $contact_pager;
var $contact_home;
var $contact_fax;
var $contact_email;
var $Insert;
var $Update;
var $Delete;
var $Cancel;
//End Variables
//Class_Initialize Event @2-25995E9B
function clsRecordcontact()
{
$this->Visible = true;
$this->Errors = new clsErrors();
$this->ds = new clscontactDataSource();
$this->ReadAllowed = false;
$this->InsertAllowed = false;
$this->UpdateAllowed = false;
$this->DeleteAllowed = false;
$this->Visible = (CCSecurityAccessCheck("1;2") == "success");
if($this->Visible)
{
ReadAllowed = CCUserInGroups(CCGetGroupID(), "1;2")
InsertAllowed = CCUserInGroups(CCGetGroupID(), "2")
UpdateAllowed = CCUserInGroups(CCGetGroupID(), "2")
DeleteAllowed = CCUserInGroups(CCGetGroupID(), "2")
$Method;
$this->ComponentName = "contact";
$this->HTMLFormAction = $this->FileName . "?" . CCAddParam(CCGetQueryString("QueryString", ""), "ccsForm", "contact");
$this->FormSubmitted = (CCGetFromGet("ccsForm", "") == "contact");
$Method = $this->FormSubmitted ? ccsPost : ccsGet;
$this->contact_name = new clsControl(ccsTextBox, "contact_name", " Name", ccsText, "", CCGetRequestParam("contact_name", $Method));
$this->contact_name->Required = true;
$this->contact_IC = new clsControl(ccsTextBox, "contact_IC", " IC", ccsText, "", CCGetRequestParam("contact_IC", $Method));
$this->cust_id = new clsControl(ccsListBox, "cust_id", "Cust Id", ccsInteger, "", CCGetRequestParam("cust_id", $Method));
$this->cust_id_ds = new clsDBvenus();
$this->cust_id_ds->SQL = "SELECT cust_name, cust_id " .
"FROM customer";
$cust_id_values = CCGetListValues($this->cust_id_ds, $this->cust_id_ds->SQL, $this->cust_id_ds->Where, $this->cust_id_ds->Order, "cust_id", "cust_name");
$this->cust_id->Values = $cust_id_values;
$this->cust_id->Required = true;
$this->new_customer = new clsControl(ccsLink, "new_customer", "new_customer", ccsText, "", CCGetRequestParam("new_customer", $Method));
$this->new_customer->Parameters = CCGetQueryString("QueryString", Array("contact_id", "ccsForm"));
$this->new_customer->Page = "form_newcustomer.php";
$this->contact_type_id = new clsControl(ccsListBox, "contact_type_id", " Type_id", ccsInteger, "", CCGetRequestParam("contact_type_id", $Method));
$this->contact_type_id_ds = new clsDBvenus();
$this->contact_type_id_ds->SQL = "SELECT type_long_desc, contact_type_id " .
"FROM contact_category";
$contact_type_id_values = CCGetListValues($this->contact_type_id_ds, $this->contact_type_id_ds->SQL, $this->contact_type_id_ds->Where, $this->contact_type_id_ds->Order, "contact_type_id", "type_long_desc");
$this->contact_type_id->Values = $contact_type_id_values;
$this->contact_type_id->Required = true;
$this->contact_mobile = new clsControl(ccsTextBox, "contact_mobile", " Mobile", ccsText, "", CCGetRequestParam("contact_mobile", $Method));
$this->contact_office = new clsControl(ccsTextBox, "contact_office", " Office", ccsText, "", CCGetRequestParam("contact_office", $Method));
$this->contact_pager = new clsControl(ccsTextBox, "contact_pager", " Pager", ccsText, "", CCGetRequestParam("contact_pager", $Method));
$this->contact_home = new clsControl(ccsTextBox, "contact_home", " Home", ccsText, "", CCGetRequestParam("contact_home", $Method));
$this->contact_fax = new clsControl(ccsTextBox, "contact_fax", " Fax", ccsText, "", CCGetRequestParam("contact_fax", $Method));
$this->contact_email = new clsControl(ccsTextBox, "contact_email", " Email", ccsText, "", CCGetRequestParam("contact_email", $Method));
$this->Insert = new clsButton("Insert", $this->ComponentName);
$this->Update = new clsButton("Update", $this->ComponentName);
$this->Delete = new clsButton("Delete", $this->ComponentName);
$this->Cancel = new clsButton("Cancel", $this->ComponentName);
}
}
//End Class_Initialize Event
//Initialize Method @2-F25E2656
function Initialize()
{
if(!$this->Visible)
return;
$this->ds->Parameters["urlcontact_id"] = CCGetFromGet("contact_id", "");
}
//End Initialize Method
//Validate Method @2-E772B39C
function Validate()
{
$Validation = true;
$Validation = ($this->contact_name->Validate() && $Validation);
$Validation = ($this->contact_IC->Validate() && $Validation);
$Validation = ($this->cust_id->Validate() && $Validation);
$Validation = ($this->new_customer->Validate() && $Validation);
$Validation = ($this->contact_type_id->Validate() && $Validation);
$Validation = ($this->contact_mobile->Validate() && $Validation);
$Validation = ($this->contact_office->Validate() && $Validation);
$Validation = ($this->contact_pager->Validate() && $Validation);
$Validation = ($this->contact_home->Validate() && $Validation);
$Validation = ($this->contact_fax->Validate() && $Validation);
$Validation = ($this->contact_email->Validate() && $Validation);
$this->CCSEventResult = CCGetEvent($this->CCSEvents["OnValidate"]);
return (($this->Errors->Count() == 0) && $Validation);
}
//End Validate Method
//Operation Method @2-B1C4C442
function Operation()
{
global $Redirect;
$this->ds->Prepare();
$this->EditMode = $this->ds->AllParametersSet;
if(!($this->Visible && $this->FormSubmitted))
return;
if($this->FormSubmitted) {
$this->PressedButton = $this->EditMode ? "Update" : "Insert";
if(strlen(CCGetParam("Insert", ""))) {
$this->PressedButton = "Insert";
} else if(strlen(CCGetParam("Update", ""))) {
$this->PressedButton = "Update";
} else if(strlen(CCGetParam("Delete", ""))) {
$this->PressedButton = "Delete";
} else if(strlen(CCGetParam("Cancel", ""))) {
$this->PressedButton = "Cancel";
}
}
$Redirect = "form_newcontact.php?" . CCGetQueryString("QueryString", Array("Insert","Update","Delete","Cancel","ccsForm"));
if($this->PressedButton == "Delete" AND DeleteAllowed) {
if(!CCGetEvent($this->Delete->CCSEvents["OnClick"]) || !$this->DeleteRow()) {
$Redirect = "";
} else {
$Redirect = "contact.php?" . CCGetQueryString("QueryString", array("ccsForm"));
}
} else if($this->PressedButton == "Cancel") {
if(!CCGetEvent($this->Cancel->CCSEvents["OnClick"])) {
$Redirect = "";
} else {
$Redirect = "contact.php?" . CCGetQueryString("QueryString", array("ccsForm"));
}
} else if($this->Validate()) {
if($this->PressedButton == "Insert" AND InsertAllowed) {
if(!CCGetEvent($this->Insert->CCSEvents["OnClick"]) || !$this->InsertRow()) {
$Redirect = "";
} else {
$Redirect = "contact.php?" . CCGetQueryString("QueryString", array("ccsForm"));
}
} else if($this->PressedButton == "Update" AND UpdateAllowed) {
if(!CCGetEvent($this->Update->CCSEvents["OnClick"]) || !$this->UpdateRow()) {
$Redirect = "";
} else {
$Redirect = "contact.php?" . CCGetQueryString("QueryString", array("ccsForm"));
}
}
} else {
$Redirect = "";
}
}
//End Operation Method
//InsertRow Method @2-4CE743D9
function InsertRow()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents["BeforeInsert"]);
$this->ds->contact_name->SetValue($this->contact_name->Value);
$this->ds->contact_IC->SetValue($this->contact_IC->Value);
$this->ds->cust_id->SetValue($this->cust_id->Value);
$this->ds->new_customer->SetValue($this->new_customer->Value);
$this->ds->contact_type_id->SetValue($this->contact_type_id->Value);
$this->ds->contact_mobile->SetValue($this->contact_mobile->Value);
$this->ds->contact_office->SetValue($this->contact_office->Value);
$this->ds->contact_pager->SetValue($this->contact_pager->Value);
$this->ds->contact_home->SetValue($this->contact_home->Value);
$this->ds->contact_fax->SetValue($this->contact_fax->Value);
$this->ds->contact_email->SetValue($this->contact_email->Value);
$this->ds->Insert();
$this->CCSEventResult = CCGetEvent($this->CCSEvents["AfterInsert"]);
if($this->ds->Errors->Count() > 0)
{
//PrintDBError "Record " & ComponentName & " / Insert Operation", DataSource.Connection.LastSQL, DataSource.Errors.ToString()
$this->ds->Errors->Clear();
$this->Errors->AddError("Database command error.");
}
return ($this->Errors->Count() == 0);
}
//End InsertRow Method
//UpdateRow Method @2-6C39A29F
function UpdateRow()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents["BeforeUpdate"]);
$this->ds->contact_name->SetValue($this->contact_name->Value);
$this->ds->contact_IC->SetValue($this->contact_IC->Value);
$this->ds->cust_id->SetValue($this->cust_id->Value);
$this->ds->new_customer->SetValue($this->new_customer->Value);
$this->ds->contact_type_id->SetValue($this->contact_type_id->Value);
$this->ds->contact_mobile->SetValue($this->contact_mobile->Value);
$this->ds->contact_office->SetValue($this->contact_office->Value);
$this->ds->contact_pager->SetValue($this->contact_pager->Value);
$this->ds->contact_home->SetValue($this->contact_home->Value);
$this->ds->contact_fax->SetValue($this->contact_fax->Value);
$this->ds->contact_email->SetValue($this->contact_email->Value);
$this->ds->Update();
$this->CCSEventResult = CCGetEvent($this->CCSEvents["AfterUpdate"]);
if($this->ds->Errors->Count() > 0)
{
//PrintDBError "Record " & ComponentName & " / Update Operation", DataSource.Connection.LastSQL, DataSource.Errors.ToString()
$this->ds->Errors->Clear();
$this->Errors->AddError("Database command error.");
}
return ($this->Errors->Count == 0);
}
//End UpdateRow Method
//DeleteRow Method @2-C32F955F
function DeleteRow()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents["BeforeDelete"]);
$this->ds->Delete();
$this->CCSEventResult = CCGetEvent($this->CCSEvents["AfterDelete"]);
if($this->ds->Errors->Count)
{
//PrintDBError "Record " & ComponentName & " / Delete Operation", DataSource.Connection.LastSQL, DataSource.Errors.ToString()
$this->ds->Errors->Clear();
$this->Errors->AddError("Database command error.");
}
return ($this->Errors->Count == 0);
}
//End DeleteRow Method
//Show Method @2-9E52B859
function Show($Tpl)
{
$RecordBlock;
if(!$this->Visible)
return;
$this->ds->open();
$RecordBlock = "Record " . $this->ComponentName;
if($this->EditMode && $this->ReadAllowed)
{
if($this->Errors->Count() == 0)
{
if($this->ds->Errors->Count() > 0)
{
//PrintDBError "Record contact", DataSource.Connection.LastSQL, Recordset.Errors.ToString
}
else if($this->ds->next_record())
{
$this->ds->SetValues();
if(!$this->FormSubmitted)
{
$this->contact_name->SetValue($this->ds->contact_name->Value);
$this->contact_IC->SetValue($this->ds->contact_IC->Value);
$this->cust_id->SetValue($this->ds->cust_id->Value);
$this->contact_type_id->SetValue($this->ds->contact_type_id->Value);
$this->contact_mobile->SetValue($this->ds->contact_mobile->Value);
$this->contact_office->SetValue($this->ds->contact_office->Value);
$this->contact_pager->SetValue($this->ds->contact_pager->Value);
$this->contact_home->SetValue($this->ds->contact_home->Value);
$this->contact_fax->SetValue($this->ds->contact_fax->Value);
$this->contact_email->SetValue($this->ds->contact_email->Value);
}
}
else
{
$this->EditMode = false;
}
}
}
$this->CCSEventResult = CCGetEvent($this->CCSEvents["BeforeShow"]);
if($this->FormSubmitted) {
$Error .= $this->contact_name->Errors->ToString();
$Error .= $this->contact_IC->Errors->ToString();
$Error .= $this->cust_id->Errors->ToString();
$Error .= $this->new_customer->Errors->ToString();
$Error .= $this->contact_type_id->Errors->ToString();
$Error .= $this->contact_mobile->Errors->ToString();
$Error .= $this->contact_office->Errors->ToString();
$Error .= $this->contact_pager->Errors->ToString();
$Error .= $this->contact_home->Errors->ToString();
$Error .= $this->contact_fax->Errors->ToString();
$Error .= $this->contact_email->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->Insert->Visible = !$this->EditMode AND InsertAllowed;
$this->Update->Visible = $this->EditMode AND UpdateAllowed;
$this->Delete->Visible = $this->EditMode AND DeleteAllowed;
$Tpl = $this->contact_name->Show($Tpl);
$Tpl = $this->contact_IC->Show($Tpl);
$Tpl = $this->cust_id->Show($Tpl);
$Tpl = $this->new_customer->Show($Tpl);
$Tpl = $this->contact_type_id->Show($Tpl);
$Tpl = $this->contact_mobile->Show($Tpl);
$Tpl = $this->contact_office->Show($Tpl);
$Tpl = $this->contact_pager->Show($Tpl);
$Tpl = $this->contact_home->Show($Tpl);
$Tpl = $this->contact_fax->Show($Tpl);
$Tpl = $this->contact_email->Show($Tpl);
$Tpl = $this->Insert->Show($Tpl);
$Tpl = $this->Update->Show($Tpl);
$Tpl = $this->Delete->Show($Tpl);
$Tpl = $this->Cancel->Show($Tpl);
$Tpl->parse($RecordBlock, false);
return $Tpl;
}
//End Show Method
} //End contact Class @2-FCB6E20C
class clscontactDataSource extends clsDBvenus { //contactDataSource Class @2-521B1A80
//Variables @2-B3DBD92D
var $CCSEvents;
var $InsertParameters;
var $UpdateParameters;
var $UpdateFields;
var $DeleteParameters;
var $CurrentCommand;
var $wp;
var $AllParametersSet;
var $CurrentOperation;
var $CCSEventResult; var $objFields;
// Datasource fields
var $contact_name;
var $contact_IC;
var $cust_id;
var $new_customer;
var $contact_type_id;
var $contact_mobile;
var $contact_office;
var $contact_pager;
var $contact_home;
var $contact_fax;
var $contact_email;
//End Variables
//Class_Initialize Event @2-D513F642
function clscontactDataSource()
{
$this->Initialize();
$this->contact_name = new clsField("contact_name", ccsText, "");
$this->contact_IC = new clsField("contact_IC", ccsText, "");
$this->cust_id = new clsField("cust_id", ccsInteger, "");
$this->new_customer = new clsField("new_customer", ccsText, "");
$this->contact_type_id = new clsField("contact_type_id", ccsInteger, "");
$this->contact_mobile = new clsField("contact_mobile", ccsText, "");
$this->contact_office = new clsField("contact_office", ccsText, "");
$this->contact_pager = new clsField("contact_pager", ccsText, "");
$this->contact_home = new clsField("contact_home", ccsText, "");
$this->contact_fax = new clsField("contact_fax", ccsText, "");
$this->contact_email = new clsField("contact_email", ccsText, "");
$this->SQL = "SELECT * " .
"FROM contact";
$this->Order = "";
}
//End Class_Initialize Event
//Prepare Method @2-B2E16F3C
function Prepare()
{
$this->wp = new clsSQLParameters();
$this->wp->AddParameter("1", "urlcontact_id", ccsInteger, "", "", $this->Parameters["urlcontact_id"], "");
$this->AllParametersSet = $this->wp->AllParamsSet();
$this->wp->Criterion[1] = $this->wp->Operation(opEqual, "contact_id", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsInteger));
$this->wp->AssembledWhere = $this->wp->Criterion[1];
$this->Where = $this->wp->AssembledWhere;
}
//End Prepare Method
//Open Method @2-277B31D1
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents["BeforeBuildSelect"]);
$this->CCSEventResult = CCGetEvent($this->CCSEvents["BeforeExecuteSelect"]);
$this->query(CCBuildSQL($this->SQL, $this->Where, $this->Order));
$this->CCSEventResult = CCGetEvent($this->CCSEvents["AfterExecuteSelect"]);
$this->MoveToPage($this->AbsolutePage);
}
//End Open Method
//SetValues Method @2-F3C8D8EE
function SetValues()
{
$this->contact_name->SetDBValue($this->f("contact_name"));
$this->contact_IC->SetDBValue($this->f("contact_IC"));
$this->cust_id->SetDBValue($this->f("cust_id"));
$this->new_customer->SetDBValue($this->f(""));
$this->contact_type_id->SetDBValue($this->f("contact_type_id"));
$this->contact_mobile->SetDBValue($this->f("contact_mobile"));
$this->contact_office->SetDBValue($this->f("contact_office"));
$this->contact_pager->SetDBValue($this->f("contact_pager"));
$this->contact_home->SetDBValue($this->f("contact_home"));
$this->contact_fax->SetDBValue($this->f("contact_fax"));
$this->contact_email->SetDBValue($this->f("contact_email"));
}
//End SetValues Method
//Delete Method @2-C2256F66
function Delete()
{
$Cmd;
$SQL;
$this->CCSEventResult = CCGetEvent($this->CCSEvents["BeforeBuildDelete"]);
$SQL = "DELETE FROM contact WHERE " . $this->Where;
$this->CCSEventResult = CCGetEvent($this->CCSEvents["BeforeExecuteDelete"]);
$this->query($SQL);
$this->CCSEventResult = CCGetEvent($this->CCSEvents["AfterExecuteDelete"]);
if($this->Errors->Count() > 0)
$this->Errors->AddError($this->Errors->ToString());
}
//End Delete Method
//Update Method @2-2706ABC1
function Update()
{
$Cmd;
$SQL;
$this->CCSEventResult = CCGetEvent($this->CCSEvents["BeforeBuildUpdate"]);
$SQL = "UPDATE contact SET " .
"contact_name=" . $this->ToSQL($this->contact_name->DBValue, $this->contact_name->DataType) . ", " .
"contact_IC=" . $this->ToSQL($this->contact_IC->DBValue, $this->contact_IC->DataType) . ", " .
"cust_id=" . $this->ToSQL($this->cust_id->DBValue, $this->cust_id->DataType) . ", " .
"contact_type_id=" . $this->ToSQL($this->contact_type_id->DBValue, $this->contact_type_id->DataType) . ", " .
"contact_mobile=" . $this->ToSQL($this->contact_mobile->DBValue, $this->contact_mobile->DataType) . ", " .
"contact_office=" . $this->ToSQL($this->contact_office->DBValue, $this->contact_office->DataType) . ", " .
"contact_pager=" . $this->ToSQL($this->contact_pager->DBValue, $this->contact_pager->DataType) . ", " .
"contact_home=" . $this->ToSQL($this->contact_home->DBValue, $this->contact_home->DataType) . ", " .
"contact_fax=" . $this->ToSQL($this->contact_fax->DBValue, $this->contact_fax->DataType) . ", " .
"contact_email=" . $this->ToSQL($this->contact_email->DBValue, $this->contact_email->DataType) .
" WHERE " . $this->Where;
$this->CCSEventResult = CCGetEvent($this->CCSEvents["BeforeExecuteUpdate"]);
$this->query($SQL);
$this->CCSEventResult = CCGetEvent($this->CCSEvents["AfterExecuteUpdate"]);
if($this->Errors->Count() > 0)
$this->Errors->AddError($this->Errors->ToString());
}
//End Update Method
//Insert Method @2-53C019E3
function Insert()
{
$Cmd;
$SQL;
$this->CCSEventResult = CCGetEvent($this->CCSEvents["BeforeBuildInsert"]);
$SQL = "INSERT INTO contact(" .
"contact_name, " .
"contact_IC, " .
"cust_id, " .
"contact_type_id, " .
"contact_mobile, " .
"contact_office, " .
"contact_pager, " .
"contact_home, " .
"contact_fax, " .
"contact_email" .
") VALUES (" .
$this->ToSQL($this->contact_name->DBValue, $this->contact_name->DataType) . ", " .
$this->ToSQL($this->contact_IC->DBValue, $this->contact_IC->DataType) . ", " .
$this->ToSQL($this->cust_id->DBValue, $this->cust_id->DataType) . ", " .
$this->ToSQL($this->contact_type_id->DBValue, $this->contact_type_id->DataType) . ", " .
$this->ToSQL($this->contact_mobile->DBValue, $this->contact_mobile->DataType) . ", " .
$this->ToSQL($this->contact_office->DBValue, $this->contact_office->DataType) . ", " .
$this->ToSQL($this->contact_pager->DBValue, $this->contact_pager->DataType) . ", " .
$this->ToSQL($this->contact_home->DBValue, $this->contact_home->DataType) . ", " .
$this->ToSQL($this->contact_fax->DBValue, $this->contact_fax->DataType) . ", " .
$this->ToSQL($this->contact_email->DBValue, $this->contact_email->DataType) .
")";
$this->CCSEventResult = CCGetEvent($this->CCSEvents["BeforeExecuteInsert"]);
$this->query($SQL);
$this->CCSEventResult = CCGetEvent($this->CCSEvents["AfterExecuteInsert"]);
if($this->Errors->Count() > 0)
$this->Errors->AddError($this->Errors->ToString());
}
//End Insert Method
} //End contactDataSource Class @2-FCB6E20C
//Initialize Page @1-7803370E
// Variables
$PathToRoot;
$FileName;
$Redirect;
$Tpl;
$TemplateFileName;
$BlockToParse;
$ComponentName;
// Events;
$CCSEvents;
$CCSEventResult;
// Connections
$DBvenus;
// Page controls
$contact;
$FileName = "form_newcontact.php";
$Redirect = "";
$TemplateFileName = "form_newcontact.html";
$BlockToParse = "main";
$PathToRoot = "./";
//End Initialize Page
//Authenticate User @1-D052AC4F
CCSecurityRedirect("1;2", "", $FileName, CCGetQueryString("QueryString", ""));
//End Authenticate User
//Initialize Objects @1-9D417A6E
$DBvenus = new clsDBvenus();
$DBvenus->connect();
// Controls
$contact = new clsRecordcontact();
$contact->Initialize();
$CCSEventResult = CCGetEvent($CCSEvents["AfterInitialize"]);
//End Initialize Objects
//Execute Components @1-983AB37B
$contact->Operation();
//End Execute Components
//Go to destination page @1-FFBAEBA7
if($Redirect)
{
UnloadPage();
header("Location: " . $Redirect);
exit;
}
//End Go to destination page
//Initialize HTML Template @1-6C46E32C
$CCSEventResult = CCGetEvent($CCSEvents["OnInitializeView"]);
$Tpl = new clsTemplate();
$Tpl->LoadTemplate($ApplicationPath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents["BeforeShow"]);
//End Initialize HTML Template
//Show Page @1-8718ABF4
$Tpl = $contact->Show($Tpl);
$Tpl->PParse("main", false);
//End Show Page
//Unload Page @1-8788CA2B
UnloadPage();
unset($Tpl);
//End Unload Page
//UnloadPage Sub @1-9EB29D4F
function UnloadPage()
{
$CCSEventResult = CCGetEvent($CCSEvents["BeforeUnload"]);
unset($contact);
}
//End UnloadPage Sub
?>
|
|
|
 |
CodeCharge Support
|
| Posted: 05/03/2002, 5:08 AM |
|
Hello,
we'll definitely fix this problem. For now please open file in code editor and modify 4 lines to get:
$ReadAllowed = CCUserInGroups(CCGetGroupID(), "1;2");
$InsertAllowed = CCUserInGroups(CCGetGroupID(), "2");
$UpdateAllowed = CCUserInGroups(CCGetGroupID(), "2");
$DeleteAllowed = CCUserInGroups(CCGetGroupID(), "2");
instead:
ReadAllowed = CCUserInGroups(CCGetGroupID(), "1;2")
InsertAllowed = CCUserInGroups(CCGetGroupID(), "2")
UpdateAllowed = CCUserInGroups(CCGetGroupID(), "2")
DeleteAllowed = CCUserInGroups(CCGetGroupID(), "2")
|
|
|
 |
Pol
|
| Posted: 10/25/2002, 9:01 AM |
|
The function CCGetListValues is not so helpful when you want to retrieve more than 2 values is there a way to do this or i just have to work with mysql's functions (
$con->query($sql);
echo $con->num_rows()." ";
for ($en_inicio=0; $en_inicio <= $con->num_rows(); $en_inicio++)
{
echo $con->f(0)." ";
echo $con->f(1)." ";
echo $con->f(2)." ";
echo $con->f(3)." ";
)
????
|
|
|
 |
|