function __construct($data, $name, $index = 0) { parent::__construct($data, $name, $index); $this->row_attrs = array(); $this->cell_attrs = array(); $this->userdata = array(); }
function __construct($data, $config, $index) { parent::__construct($data, $config, $index); $this->im0 = false; $this->im1 = false; $this->im2 = false; $this->check = false; }
function __construct($id, $data, $name, $index, $parent_id) { parent::__construct($id, $data, $name, $index); $this->parent_id = $parent_id; $this->im0 = false; $this->im1 = false; $this->im2 = false; $this->check = false; }
function __construct($data, $config, $index) { parent::__construct($data, $config, $index); $this->im0 = false; $this->im1 = false; $this->im2 = false; $this->check = false; $this->attrs = array(); $this->userdata = array(); }
function __construct($data, $config, $index) { parent::__construct($data, $config, $index); $this->selected = false; }
$snmpHeader = mysql_fetch_assoc($resultParametroHeader); if ($snmpServer["valor"] != "" && $snmpCommunity["valor"] != "" && $snmpHeader["valor"]) { $trapserver = $snmpServer["valor"]; $community = $snmpCommunity["valor"]; while ($filaDataItem = mysql_fetch_assoc($resultDataItem)) { if ($filaDataItem["changetrap"] == "true") { $typeAlert = ""; $oid = ""; if ($filaDataItem["with_data"] == "true") { $typeAlert = "WITH_DATA"; $oid = $snmpHeader["valor"] . ".1"; } else { $typeAlert = "WITHOUT_DATA"; $oid = $snmpHeader["valor"] . ".2"; } $filaDataItem["name_item"] = str_replace(" ", "-", $filaDataItem["name_item"]); $sh = "snmptrap -v 2c -c {$community} {$trapserver} '' {$oid} {$oid} s \"DB=" . $filaDataItem["dbase"] . "*IT=" . $filaDataItem["name_item"] . "*LDTD=" . $filaDataItem["last_date"] . "*LHRD=" . $filaDataItem["last_hour"] . "*TA={$typeAlert}\""; shell_exec($sh); $sqlUpdateAlert = "UPDATE `bm_items_alert_data` SET `sendtrap` = 'true', `changetrap` = 'false' WHERE `id` = " . $filaDataItem["id_item"]; mysql_query($sqlUpdateAlert, $id); } } } } } if ($argv[1] != "") { $dataItem = new DataItem("localhost", "root", "bsw\$\$2009", $argv[1]); } else { $dataItem = new DataItem("localhost", "root", "bsw\$\$2009", false); } $dataItem->start();
/** * DataEntry Form * */ function SubmitDataSheet($data, $form, $request) { // Create a new DataSheet object $oDataSheet = DataSheet::save_current_entry(); $form->saveInto($oDataSheet); //save to current Member //check that this is member is the owner of the CleanUpEvent $oCurrentMember = Member::currentUser(); $iMemberID = $oCurrentMember->ID; $oDataSheet->MemberID = $iMemberID; //Save Image //Save DataCategories -> DataItems $oDataEntryPage = DataObject::get_one('DataEntryPage'); $iDataEntryPageID = $oDataEntryPage->ID; $oFormCategorys = DataObject::get('FormCategory', 'DataEntryPageID =' . $iDataEntryPageID, '', ''); foreach ($oFormCategorys as $category) { $sCatFieldName = $category->ID . '_' . $category->FieldName; if ($data[$sCatFieldName]) { $oDataCategory = new DataCategory(); $oDataCategory->Title = $category->Title; $oDataCategory->Percentage = $data[$sCatFieldName]; //Save to page $oDataCategory->DataEntryPageID = $iDataEntryPageID; //Save to datasheet $oDataCategory->DataSheetID = $oDataSheet->ID; $oDataCategory->MemberID = $iMemberID; $oDataCategory->write(); //Get the items $oCatItems = DataObject::get('FormItem', 'DataEntryPageID =' . $iDataEntryPageID . ' AND FormCategoryID = ' . $category->ID, '', ''); //Loop through category->items saving as DataItems foreach ($oCatItems as $item) { $oDataItem = new DataItem(); $sItemFieldName = $item->ID . '_' . $item->FieldName; $oDataItem->Title = $item->Title; $oDataItem->Amount = $data[$sItemFieldName]; //Save to page $oDataItem->DataEntryPageID = $iDataEntryPageID; //Save to datasheet $oDataItem->DataSheetID = $oDataSheet->ID; //Very Important that you save all items with the newly created Data Category ID $oDataItem->DataCategoryID = $oDataCategory->ID; $oDataItem->MemberID = $iMemberID; $oDataItem->write(); } } } //Write data to the data sheet $oDataSheet->write(); // Email the administrator $oDataSheet->mailSiteOwner(); // Email the user $oDataSheet->mailSiteUser(); Director::redirect('my-data-sheets/success/'); }
function __construct($id, $data, $name, $index = 0) { parent::__construct($id, $data, $name, $index); $this->selected = false; }