Exemple #1
0
function doUpdateDxList($extraParams)
{
    try {
        // include the data access class
        include_once "SQLUtils.php";
        // include the Dx list class
        include_once "DxList.php";
        // init the return code
        $retVal = array(false, "No data.");
        // create a Dx list object
        $dxList = new DxList();
        // load the object with the extra param data
        $dxList->ID = $extraParams[0] + 0;
        $dxList->Official = $extraParams[1] + 0;
        // get the data
        $retVal = updateObject($dxList);
    } catch (Exception $e) {
        // set the success code
        $retVal[0] = False;
        // return the data formatted for a jqx grid
        $retVal[1] = $e->getMessage();
    }
    // return to the caller
    return $retVal;
}
Exemple #2
0
 $founderWorkHisObj->WorkHisDetail = sqlEscapeString($WorkHisDetail);
 $founderWorkHisObj->PositionHeld = sqlEscapeString($PositionHeld);
 $founderWorkHisObj->Seniority = sqlEscapeString($Seniority);
 $founderWorkHisObj->Position_Domain = sqlEscapeString($Position_Domain);
 $founderWorkHisObj->W_From = sqlEscapeString($W_From);
 $founderWorkHisObj->W_To = $W_To;
 $founderWorkHisObj->Industry = sqlEscapeString($Industry);
 $founderWorkHisObj->Sector = sqlEscapeString($Sector);
 $founderWorkHisObj->LastUpdated = date('Y-m-d H:i:s');
 $founderWorkHisObj->LastUpdatedBy = $userInfo->ID;
 // include the data access class
 include_once "SQLUtils.php";
 // init the return code
 $retVal = array(false, "Data not inserted");
 //insert/update data
 $retVal = updateObject($founderWorkHisObj);
 // set the informational message from the update
 $validated = $retVal[0];
 $validationMessage = $retVal[1];
 // if succeeded clear out the fields
 if ($retVal[0]) {
     //$Number = '';
     $WorkHisDetail = '';
     $PositionHeld = '';
     $Seniority = '';
     $Position_Domain = '';
     $W_From = '';
     $W_To = '';
     $Industry = '';
     $Sector = '';
 }
 }
 if (!zbx_empty($_REQUEST['newgroup'])) {
     # new group
     $response = addRack($_REQUEST['newgroup']);
     if (isset($response['error'])) {
         show_messages(false, '', 'Updating racktables rack ' . $_REQUEST['newgroup'] . ' is failed');
     }
     array_push($groupNames, $_REQUEST['newgroup']);
 }
 $response = array();
 $operate = '';
 if ($createNew) {
     $response = addObject($_REQUEST['host'], $groupNames, $_REQUEST['status']);
     $operate = "Updating";
 } else {
     $response = updateObject($hostOld['host'], $_REQUEST['host'], $groupNames, $_REQUEST['status']);
     $operate = "Adding";
 }
 if (isset($response['error'])) {
     show_messages(false, '', $operate . " racktables object is failed. Error message:" . $response['error']);
 } else {
     $response = updateObjectIP($_REQUEST['host'], $interfaces);
     if (isset($response['error'])) {
         show_messages(false, '', $operate . " racktables object is failed. Error message:" . $response['error']);
     }
 }
 ##############################################################################################
 if ($createNew) {
     $hostIds = API::Host()->create($host);
     if ($hostIds) {
         $hostId = reset($hostIds['hostids']);
Exemple #4
0
     $object = $data->{'object'};
     $values = $data->{'values'};
     if ($object && $values) {
         connectToDB();
         insertObject($userId, $object, $values);
     } else {
         echo $sufficientValuesWereNotSupplied;
     }
 } else {
     if ($action == "update") {
         $object = $data->{'object'};
         $values = $data->{'values'};
         $where = $data->{'where'};
         if ($object && $values && $where) {
             connectToDB();
             updateObject($userId, $object, $values, $where);
         } else {
             echo $sufficientValuesWereNotSupplied;
         }
     } else {
         if ($action == "delete") {
             $object = $data->{'object'};
             $guid = $data->{'guid'};
             if ($object && $guid) {
                 connectToDB();
                 deleteObject($object, $guid);
             } else {
                 echo $sufficientValuesWereNotSupplied;
             }
         }
     }
Exemple #5
0
    if (isset($dupeSelect) && !empty($dupeSelect)) {
        $retVal = checkForDuplicateRelationshipFounderName(sqlEscapeString($dupeSelect), sqlEscapeString($CompanyID));
        if ($retVal[0] == false) {
            // get the conpany object definition loaded
            include_once "FounderToCompanyJoin.cls.php";
            // create a new company object
            $founderToCompany = new FounderToCompanyJoin();
            // load the join object
            $founderToCompany->FounderID = $dupeSelect;
            $founderToCompany->CompanyID = $CompanyID;
            // include the data access class
            include_once "SQLUtils.php";
            // init the return code
            $retVal = array(false, "Data not inserted");
            // insert the data
            $retVal = updateObject($founderToCompany);
            // set the return codes and messages
            $validated = $retVal[0];
            $validationMessage = $retVal[1];
        } else {
            // set the validation error flag
            $validated = false;
            // set the validation error message
            $validationMessage = 'This Founder is aleady associated with this company.</br>';
        }
    } else {
        $validated = false;
        $validationMessage = "Please enter all fields properly for a new company/founder insertion.";
    }
}
// output the basic header HTML
         $siteInstaller->updateINIFiles($settingsGroup);
     }
     // 'admin_url' is not needed anymore.
     unset($params['siteaccess_urls']['admin_url']);
     updateINIAccessType($accessType, $params);
     $siteInstaller->updateRoles(array('roles' => eZSiteRoles($params)));
     $siteInstaller->updatePreferences(array('prefs' => eZSitePreferences($params)));
     setVersion('ezwebin', '1.2.0');
     postInstallAdminSiteaccessINIUpdate($params);
     postInstallUserSiteaccessINIUpdate($params);
     createTranslationSiteAccesses($params);
     // updateTemplateLookClassAttributes() and updateTemplateLookObjectAttributes();
     $classIdentifier = 'template_look';
     $newAttributeIdArr = expandClass($classIdentifier);
     foreach ($newAttributeIdArr as $id) {
         updateObject($classIdentifier, $id);
     }
     $templateLookData = templateLookObjectData($params);
     $siteInstaller->updateContentObjectAttributes(array('object_id' => $webinInstaller->setting('template_look_object_id'), 'attributes_data' => $templateLookData));
     $siteInstaller->swapNodes(array('src_node' => array('name' => "eZ Publish"), 'dst_node' => array('name' => "Home")));
     $siteInstaller->removeContentObject(array('name' => 'eZ Publish'));
     $webinInstaller->postInstall();
 }
 //
 // Output installation status.
 //
 showMessage2('Installation complete.');
 showMessage('URLs to access eZWebin sites:');
 foreach ($siteaccessUrls as $siteaccessType => $siteaccessInfo) {
     showMessage("  {$siteaccessType}:");
     foreach ($siteaccessInfo as $siteaccessName => $urlInfo) {
Exemple #7
0
            include_once "DxList.php";
            // create a new Dx list object
            $dxList = new DxList();
            // load up the members
            $dxList->ID = -1;
            $dxList->Name = $Name;
            $dxList->Description = $Description;
            $dxList->Version = $Version;
            $dxList->UserID = $userInfo->ID;
            $dxList->Official = 0;
            // include the data access class
            include_once "SQLUtils.php";
            // init the return code
            $retVal = array(false, "Data not inserted");
            // insert the data
            $retVal = updateObject($dxList);
            // set the return codes and messages
            $validated = $retVal[0];
            $validationMessage = $retVal[1];
            // clear all previous data on success
            if ($validated) {
                $Name = '';
                $Description = '';
                $Version = '';
            }
        } else {
            $validated = false;
            $validationMessage = "Please enter all fields properly for a new Dx List.";
        }
    }
}
Exemple #8
0
     // check for a duplucate name or prev/other name
     $retVal = checkForDuplicateTypeName($TypeName);
     // was this a new founder
     if ($retVal[0] == false) {
         // get the founder object definition loaded
         include_once "FundingType.cls.php";
         // create a new founder object
         $type = new FundingType();
         // load the founder object
         $type->Name = sqlEscapeString($TypeName);
         // include the data access class
         include_once "SQLUtils.php";
         // init the return code
         $retVal = array(false, "Data not inserted");
         // insert the data
         $retVal = updateObject($type);
         // set the return codes and messages
         $validated = $retVal[0];
         $validationMessage = "Insert new type successful.";
         // clear out for the next run
         $TypeName = '';
     } else {
         // set the return codes and messages
         $validated = false;
         $validationMessage = 'Insertion of type "' . $TypeName . '" was not successful because duplicates were detected.</br></br>';
         // save the duplicate founder message
         $duplicatedType = $retVal[1];
     }
 } else {
     // set the return codes and messages
     $validated = false;
Exemple #9
0
        $founderEduObj = new FounderEdu();
        //load the FounderEdu object with the page parameters
        //$founderEduObj->FounderEduID = NULL;
        $founderEduObj->FounderID = $FounderID;
        $founderEduObj->DegreeFrom = sqlEscapeString($NewDegreeFrom);
        $founderEduObj->GraduatedYr = $NewGraduatedYr;
        $founderEduObj->Major = sqlEscapeString($NewMajor);
        $founderEduObj->LastUpdated = date('Y-m-d H:i:s');
        $founderEduObj->LastUpdatedBy = $userInfo->ID;
        $founderEduObj->DegreeLookupID = $NewDegreeType;
        // include the data access class
        include_once "SQLUtils.php";
        // init the return code
        $retVal = array(false, "Data not inserted");
        //insert/update data
        $retVal = updateObject($founderEduObj);
        // set the informational message from the update
        $validated = $retVal[0];
        $validationMessage = $retVal[1];
        // if succeeded clear out the fields
        if ($retVal[0]) {
            $NewMajor = '';
            $NewDegreeFrom = '';
        }
    } else {
        $validated = false;
        $validationMessage = "You must add a valid education data.";
    }
}
// output the basic header HTML
include "../Includes/header.php";
Exemple #10
0
<?php

// include the company object
include_once "Company.cls.php";
// create a new company object
$companyObj = new Company();
// load the compant object with the page parameters
$companyObj->CompanyID = 8;
$companyObj->CompanyName = 'sdf';
// include the data access class
include_once "SQLUtils.php";
// init the return code
$retVal = array(false, "Data not inserted");
// insert/update the data
$retVal = updateObject($companyObj);
// set the return codes and messages
$validated = $retVal[0];
$validationMessage = $retVal[1];
Exemple #11
0
/**
 * Gets the founders Work History
 *
 * @param $founderID
 */
function doUpdateFounderWorkHisList($data)
{
    try {
        // get the object definition
        include_once "FounderWorkHis.cls.php";
        // cerate a new founder object
        $FounderWorkHis = new FounderWorkHis();
        // load the object
        $FounderWorkHis->WorkHisID = $data["WorkHisID"];
        $FounderWorkHis->FounderID = $data["FounderID"];
        //$FounderWorkHis->Number = $data["Number"];
        $FounderWorkHis->WorkHisDetail = $data["WorkHisDetail"];
        $FounderWorkHis->PositionHeld = $data["PositionHeld"];
        $FounderWorkHis->Seniority = $data["Seniority"];
        $FounderWorkHis->Position_Domain = $data["Position_Domain"];
        $FounderWorkHis->W_From = $data["W_From"];
        $FounderWorkHis->W_To = $data["W_To"];
        $FounderWorkHis->Industry = $data["Industry"];
        $FounderWorkHis->Sector = $data["Sector"];
        //error_log(print_r($FounderWorkHis), true);
        // include the data access class
        include_once "SQLUtils.php";
        // init the return code
        $retVal = array(false, "No data.");
        // update the data
        $retVal = updateObject($FounderWorkHis);
    } catch (Exception $e) {
        // set the success code
        $retVal[0] = false;
        // return the data formatted for a jqx grid
        $retVal[1] = $e->getMessage();
    }
    // return to the caller
    return $retVal;
}