当前位置: 首页>>代码示例>>PHP>>正文


PHP updateStatus函数代码示例

本文整理汇总了PHP中updateStatus函数的典型用法代码示例。如果您正苦于以下问题:PHP updateStatus函数的具体用法?PHP updateStatus怎么用?PHP updateStatus使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了updateStatus函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: removeFromWatchlist

function removeFromWatchlist($selectedids,$couid)
{
    if ($selectedids != -1) {
        foreach ($selectedids as $sid) {
            updateStatus(0, $sid, $couid);  // update watchlist status for each student on course base
        }
    }
}
开发者ID:kmahesh541,项目名称:mitclone,代码行数:8,代码来源:customlib.php

示例2: testDirectObjectRefs

function testDirectObjectRefs($arrayOfURLs, $testId)
{
    connectToDb($db);
    updateStatus($db, "Testing all URLs for Insecure Direct Object References...", $testId);
    $log = new Logger();
    $log->lfile('logs/eventlogs');
    $log->lwrite("Identifying which URLs have parameters");
    $log->lwrite("All URLs found during crawl:");
    $urlsWithParameters = array();
    foreach ($arrayOfURLs as $currentUrl) {
        $log->lwrite($currentUrl);
        if (strpos($currentUrl, "?")) {
            array_push($urlsWithParameters, $currentUrl);
        }
    }
    $log->lwrite("URLs with parameters:");
    foreach ($urlsWithParameters as $currentUrl) {
        $log->lwrite($currentUrl);
    }
    $log->lwrite("Testing each URL that has parameters");
    foreach ($urlsWithParameters as $currentUrl) {
        $parsedUrl = parse_url($currentUrl);
        if ($parsedUrl) {
            $query = $parsedUrl['query'];
            $parameters = array();
            parse_str($query, $parameters);
            foreach ($parameters as $para) {
                if (preg_match('/\\.([^\\.]+)$/', $para)) {
                    //Check if this vulnerability has already been found and added to DB. If it hasn't, add it to DB.
                    $tableName = 'test' . $testId;
                    $query = "SELECT * FROM test_results WHERE test_id = {$testId} AND type = 'idor' AND method = 'get' AND url = '{$currentUrl}' AND attack_str = '{$para}'";
                    $result = $db->query($query);
                    if (!$result) {
                        $log->lwrite("Could not execute query {$query}");
                    } else {
                        $log->lwrite("Successfully executed query {$query}");
                        $numRows = $result->num_rows;
                        if ($numRows == 0) {
                            $log->lwrite("Number of rows is {$numRows} for query: {$query}");
                            insertTestResult($db, $testId, 'idor', 'get', $currentUrl, $para);
                        }
                    }
                }
            }
        } else {
            $log->lwrite("Could not parse malformed URL: {$currentUrl}");
        }
    }
}
开发者ID:3nj0y,项目名称:webvulscan,代码行数:49,代码来源:testDirectObjectRefs.php

示例3: emailPdfToUser

function emailPdfToUser($fileName, $username, $email, $testId)
{
    connectToDb($db);
    updateStatus($db, "Emailing PDF report to {$email}...", $testId);
    $log = new Logger();
    $log->lfile('logs/eventlogs');
    $log->lwrite("Starting email PDF function for test: {$testId}");
    if (file_exists($fileName)) {
        $log->lwrite("File: {$fileName} exists");
        $fileatt = $fileName;
        // Path to the file
        $fileatt_type = "application/pdf";
        // File Type
        $fileatt_name = 'Test_' . $testId . '.pdf';
        // Filename that will be used for the file as the attachment
        $email_from = "webvulscan@gmail.com";
        // Who the email is from, don't think this does anything
        $email_subject = "WebVulScan Detailed Report";
        // The Subject of the email
        $email_message = "Hello {$username},<br><br>";
        $email_message .= 'Thank you for scanning with WebVulScan. Please find the scan results attached in the PDF report.<br><br>';
        $email_message .= 'Please reply to this email if you have any questions.<br><br>';
        $email_message .= 'Kind Regards,<br><br>';
        $email_message .= 'WebVulScan Team<br>';
        $email_to = $email;
        // Who the email is to
        $headers = "From: " . $email_from;
        $file = fopen($fileatt, 'rb');
        $data = fread($file, filesize($fileatt));
        fclose($file);
        $semi_rand = md5(time());
        $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
        $headers .= "\nMIME-Version: 1.0\n" . "Content-Type: multipart/mixed;\n" . " boundary=\"{$mime_boundary}\"";
        $email_message .= "This is a multi-part message in MIME format.\n\n" . "--{$mime_boundary}\n" . "Content-Type:text/html; charset=\"iso-8859-1\"\n" . "Content-Transfer-Encoding: 7bit\n\n" . ($email_message .= "\n\n");
        $data = chunk_split(base64_encode($data));
        $email_message .= "--{$mime_boundary}\n" . "Content-Type: {$fileatt_type};\n" . " name=\"{$fileatt_name}\"\n" . "Content-Transfer-Encoding: base64\n\n" . ($data .= "\n\n" . "--{$mime_boundary}--\n");
        $mailSent = mail($email_to, $email_subject, $email_message, $headers);
        if ($mailSent) {
            $log->lwrite("{$fileName} successfully sent to {$email}");
        } else {
            $log->lwrite("There was a problem sending {$fileName} to {$email}");
        }
    } else {
        $log->lwrite("File: {$fileName} does not exist");
    }
}
开发者ID:3nj0y,项目名称:webvulscan,代码行数:46,代码来源:emailPdfToUser.php

示例4: delete

 /**
  * Deletes the selected server
  */
 function delete($server_id)
 {
     global $fmdb, $__FM_CONFIG;
     /** Does the server_id exist for this account? */
     $server_serial_no = getNameFromID($server_id, 'fm_' . $__FM_CONFIG[$_SESSION['module']]['prefix'] . 'servers', 'server_', 'server_id', 'server_serial_no');
     basicGet('fm_' . $__FM_CONFIG[$_SESSION['module']]['prefix'] . 'servers', $server_serial_no, 'server_', 'server_serial_no');
     if ($fmdb->num_rows) {
         /** Delete associated policies */
         if (updateStatus('fm_' . $__FM_CONFIG[$_SESSION['module']]['prefix'] . 'policies', $server_serial_no, 'policy_', 'deleted', 'server_serial_no') === false) {
             return __('The associated policies could not be removed because a database error occurred.');
         }
         /** Delete server */
         $tmp_name = getNameFromID($server_id, 'fm_' . $__FM_CONFIG[$_SESSION['module']]['prefix'] . 'servers', 'server_', 'server_id', 'server_name');
         if (updateStatus('fm_' . $__FM_CONFIG[$_SESSION['module']]['prefix'] . 'servers', $server_id, 'server_', 'deleted', 'server_id')) {
             addLogEntry(sprintf(__("Server '%s' (%s) was deleted"), $tmp_name, $server_serial_no));
             return true;
         }
     }
     return __('This server could not be deleted.');
 }
开发者ID:pclemot,项目名称:facileManager,代码行数:23,代码来源:class_servers.php

示例5: delete

 /**
  * Deletes the selected policy
  */
 function delete($policy_id, $server_serial_no)
 {
     global $fmdb, $__FM_CONFIG;
     /** Does the policy_id exist for this account? */
     basicGet('fm_' . $__FM_CONFIG[$_SESSION['module']]['prefix'] . 'policies', $policy_id, 'policy_', 'policy_id');
     if ($fmdb->num_rows) {
         /** Delete service */
         if (updateStatus('fm_' . $__FM_CONFIG[$_SESSION['module']]['prefix'] . 'policies', $policy_id, 'policy_', 'deleted', 'policy_id')) {
             setBuildUpdateConfigFlag($_REQUEST['server_serial_no'], 'yes', 'build');
             addLogEntry('Deleted policy from ' . getNameFromID($server_serial_no, 'fm_' . $__FM_CONFIG[$_SESSION['module']]['prefix'] . 'servers', 'server_', 'server_serial_no', 'server_name') . '.');
             return true;
         }
     }
     return __('This policy could not be deleted.');
 }
开发者ID:pclemot,项目名称:facileManager,代码行数:18,代码来源:class_policies.php

示例6: delete

 /**
  * Deletes the selected option
  */
 function delete($id, $server_serial_no = 0)
 {
     global $fmdb, $__FM_CONFIG;
     $tmp_name = getNameFromID($id, 'fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'config', 'cfg_', 'cfg_id', 'cfg_name');
     $tmp_server_name = $server_serial_no ? getNameFromID($server_serial_no, 'fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'servers', 'server_', 'server_serial_no', 'server_name') : 'All Servers';
     if (updateStatus('fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'config', $id, 'cfg_', 'deleted', 'cfg_id') === false) {
         return __('This option could not be deleted because a database error occurred.');
     } else {
         setBuildUpdateConfigFlag($server_serial_no, 'yes', 'build');
         addLogEntry(sprintf(__("Option '%s' for %s was deleted."), $tmp_name, $tmp_server_name));
         return true;
     }
 }
开发者ID:pclemot,项目名称:facileManager,代码行数:16,代码来源:class_options.php

示例7: header

        if (!empty($_POST)) {
            $response = $fm_users->update($_POST);
            if ($response !== true) {
                $form_data = $_POST;
            } else {
                header('Location: ' . $GLOBALS['basename']);
            }
        }
        if (isset($_GET['status'])) {
            if ($_GET['id'] == 1) {
                $_GET['id'] = 0;
            }
            $user_info = getUserInfo($_GET['id']);
            if ($user_info) {
                if ($user_info['user_template_only'] == 'no') {
                    if (updateStatus('fm_users', $_GET['id'], 'user_', $_GET['status'], 'user_id')) {
                        addLogEntry(sprintf(_("Set user '%s' status to %s."), $user_info['user_login'], $_GET['status']), $fm_name);
                        header('Location: ' . $GLOBALS['basename']);
                    }
                }
            }
            $response = sprintf(_('This user could not be set to %s.') . "\n", $_GET['status']);
        }
}
printHeader();
@printMenu();
echo printPageHeader($response, null, currentUserCan('manage_users'));
$sort_field = 'user_login';
$sort_direction = null;
if (isset($_SESSION[$_SESSION['module']][$GLOBALS['path_parts']['filename']])) {
    extract($_SESSION[$_SESSION['module']][$GLOBALS['path_parts']['filename']], EXTR_OVERWRITE);
开发者ID:pclemot,项目名称:facileManager,代码行数:31,代码来源:admin-users.php

示例8: empty_queue

function empty_queue($session_id)
{
    //$solr_query .= '&fl=id+status_analyzedStatus+status_transcribedStatus+status_parsedL1Status+status_parsedL2Status+status_parsedL3Status';
    $apiary_session = $session_id;
    $solr_q = 'q=status_locked_session:("' . $apiary_session . '")';
    $solr_fl = 'fl=id+status_analyzedStatus+status_transcribedStatus+status_parsedL1Status+status_parsedL2Status+status_parsedL3Status';
    $solr_op = '';
    $solr_rows = 'rows=10000';
    $solr_sxml = solr_query_xml($solr_q, $solr_fl, $solr_op, $solr_rows);
    if ($solr_sxml != false) {
        foreach ($solr_sxml->result[0]->doc as $doc) {
            $pid = '';
            $analyzedStatus = '';
            $transcribedStatus = '';
            $parsedL1Status = '';
            $parsedL2Status = '';
            $parsedL3Status = '';
            foreach ($doc->children() as $sxml_node) {
                if ($sxml_node->attributes()->name == 'id') {
                    $pid = $sxml_node;
                }
                if ($sxml_node->attributes()->name == 'status_analyzedStatus') {
                    $analyzedStatus = $sxml_node;
                }
                if ($sxml_node->attributes()->name == 'status_transcribedStatus') {
                    $transcribedStatus = $sxml_node;
                }
                if ($sxml_node->attributes()->name == 'status_parsedL1Status') {
                    $parsedL1Status = $sxml_node;
                }
                if ($sxml_node->attributes()->name == 'status_parsedL2Status') {
                    $parsedL2Status = $sxml_node;
                }
                if ($sxml_node->attributes()->name == 'status_parsedL3Status') {
                    $parsedL3Status = $sxml_node;
                }
            }
            if (strpos($pid, 'ap-image:') > -1) {
                if ($analyzedStatus == "in progress") {
                    updateStatus($pid, "analyzedStatus", "incomplete");
                }
                AP_Image::releaseImageLock($pid);
            } else {
                if (strpos($pid, 'ap-roi:') > -1) {
                    if ($transcribedStatus == "in progress") {
                        updateStatus($pid, "transcribedStatus", "incomplete");
                    }
                    if ($parsedL1Status == "in progress") {
                        updateStatus($pid, "parsedL1Status", "incomplete");
                    }
                    if ($parsedL2Status == "in progress") {
                        updateStatus($pid, "parsedL2Status", "incomplete");
                    }
                    if ($parsedL3Status == "in progress") {
                        updateStatus($pid, "parsedL3Status", "incomplete");
                    }
                    AP_ROI::releaseROILock($pid);
                }
            }
        }
        return true;
    } else {
        return false;
    }
}
开发者ID:0x27,项目名称:apiary-project,代码行数:65,代码来源:workspace.functions.php

示例9: delete

 /**
  * Deletes the selected zone and all associated records
  */
 function delete($domain_id)
 {
     global $fmdb, $__FM_CONFIG;
     /** Does the domain_id exist for this account? */
     basicGet('fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'domains', $domain_id, 'domain_', 'domain_id', 'active');
     if ($fmdb->num_rows) {
         $domain_result = $fmdb->last_result[0];
         unset($fmdb->num_rows);
         /** Delete all associated configs */
         basicGet('fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'config', $domain_id, 'cfg_', 'domain_id');
         if ($fmdb->num_rows) {
             if (updateStatus('fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'config', $domain_id, 'cfg_', 'deleted', 'domain_id') === false) {
                 return __('The associated configs for this zone could not be deleted because a database error occurred.');
             }
             unset($fmdb->num_rows);
         }
         /** Delete all associated records */
         basicGet('fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'records', $domain_id, 'record_', 'domain_id');
         if ($fmdb->num_rows) {
             if (updateStatus('fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'records', $domain_id, 'record_', 'deleted', 'domain_id') === false) {
                 return __('The associated records for this zone could not be deleted because a database error occurred.');
             }
             unset($fmdb->num_rows);
         }
         basicGet('fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'records_skipped', $domain_id, 'record_', 'domain_id');
         if ($fmdb->num_rows) {
             if (updateStatus('fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'records_skipped', $domain_id, 'record_', 'deleted', 'domain_id') === false) {
                 return __('The associated records for this zone could not be deleted because a database error occurred.');
             }
             unset($fmdb->num_rows);
         }
         /** Delete all associated SOA */
         if (!$domain_result->domain_clone_domain_id && $domain_result->soa_id) {
             basicGet('fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'soa', $domain_result->soa_id, 'soa_', 'soa_id', "AND soa_template='no'");
             if ($fmdb->num_rows) {
                 if (updateStatus('fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'soa', $domain_result->soa_id, 'soa_', 'deleted', 'soa_id') === false) {
                     return __('The SOA for this zone could not be deleted because a database error occurred.');
                 }
                 unset($fmdb->num_rows);
             }
         }
         /** Delete associated records from fm_{$__FM_CONFIG['fmDNS']['prefix']}track_builds */
         if (basicDelete('fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'track_builds', $domain_id, 'domain_id', false) === false) {
             return sprintf(__('The zone could not be removed from the %s table because a database error occurred.'), 'fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'track_builds');
         }
         /** Force buildconf for all associated DNS servers */
         setBuildUpdateConfigFlag(getZoneServers($domain_id, array('masters', 'slaves')), 'yes', 'build');
         /** Delete cloned zones */
         basicGet('fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'domains', $domain_id, 'domain_', 'domain_clone_domain_id');
         if ($fmdb->num_rows) {
             unset($fmdb->num_rows);
             /** Delete cloned zone records first */
             basicGetList('fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'domains', 'domain_id', 'domain_', "AND domain_clone_domain_id={$domain_id}");
             if ($fmdb->num_rows) {
                 $clone_domain_result = $fmdb->last_result;
                 $clone_domain_num_rows = $fmdb->num_rows;
                 for ($i = 0; $i < $clone_domain_num_rows; $i++) {
                     if (updateStatus('fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'records', $clone_domain_result[$i]->domain_id, 'record_', 'deleted', 'domain_id') === false) {
                         return __('The associated records for the cloned zones could not be deleted because a database error occurred.');
                     }
                 }
                 unset($fmdb->num_rows);
             }
             if (updateStatus('fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'domains', $domain_id, 'domain_', 'deleted', 'domain_clone_domain_id') === false) {
                 return __('The associated clones for this zone could not be deleted because a database error occurred.');
             }
         }
         /** Delete zone */
         $tmp_name = displayFriendlyDomainName(getNameFromID($domain_id, 'fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'domains', 'domain_', 'domain_id', 'domain_name'));
         if (updateStatus('fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'domains', $domain_id, 'domain_', 'deleted', 'domain_id') === false) {
             return __('This zone could not be deleted because a database error occurred.');
         }
         addLogEntry("Deleted zone '{$tmp_name}' and all associated records.");
         return true;
     }
     return __('This zone does not exist.');
 }
开发者ID:pclemot,项目名称:facileManager,代码行数:80,代码来源:class_zones.php

示例10: delete

 /**
  * Deletes the selected server
  */
 function delete($id)
 {
     global $fmdb, $__FM_CONFIG;
     // Delete corresponding configs
     //		if (!updateStatus('fm_config', $id, 'cfg_', 'deleted', 'cfg_server')) {
     //			return 'This backup server could not be deleted.'. "\n";
     //		}
     // Delete server
     $tmp_name = getNameFromID($id, 'fm_' . $__FM_CONFIG['fmSQLPass']['prefix'] . 'servers', 'server_', 'server_id', 'server_name');
     if (!updateStatus('fm_' . $__FM_CONFIG['fmSQLPass']['prefix'] . 'servers', $id, 'server_', 'deleted', 'server_id')) {
         return __('This database server could not be deleted.') . "\n";
     } else {
         addLogEntry("Deleted database server '{$tmp_name}'.");
         return true;
     }
 }
开发者ID:pclemot,项目名称:facileManager,代码行数:19,代码来源:class_servers.php

示例11: delete

 /**
  * Deletes the selected server/group
  */
 function delete($server_id, $type)
 {
     global $fmdb, $__FM_CONFIG;
     /** Does the server_id exist for this account? */
     if ($type == 'servers') {
         $server_serial_no = getNameFromID($server_id, 'fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'servers', 'server_', 'server_id', 'server_serial_no');
         basicGet('fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'servers', $server_serial_no, 'server_', 'server_serial_no');
         if ($fmdb->num_rows) {
             /** Update all associated domains */
             $query = "SELECT domain_id,domain_name_servers FROM `fm_{$__FM_CONFIG['fmDNS']['prefix']}domains` WHERE (`domain_name_servers` LIKE '%;s_{$server_id};%' OR `domain_name_servers` LIKE '%;s_{$server_id}' OR `domain_name_servers` LIKE 's_{$server_id};%' OR `domain_name_servers`='s_{$server_id}') AND `account_id`='{$_SESSION['user']['account_id']}'";
             $fmdb->query($query);
             if ($fmdb->num_rows) {
                 $result = $this->updateNameServerAssignments($fmdb->last_result, $fmdb->num_rows, 's_' . $server_id);
                 if ($result !== true) {
                     return $result;
                 }
             }
             /** Delete associated config options */
             if (updateStatus('fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'config', $server_serial_no, 'cfg_', 'deleted', 'server_serial_no') === false) {
                 return __('The associated server configs could not be deleted because a database error occurred.');
             }
             /** Delete associated records from fm_{$__FM_CONFIG['fmDNS']['prefix']}track_builds */
             if (basicDelete('fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'track_builds', $server_serial_no, 'server_serial_no', false) === false) {
                 return sprintf(__('The server could not be removed from the %s table because a database error occurred.'), 'fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'track_builds');
             }
             /** Delete server */
             $tmp_name = getNameFromID($server_id, 'fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'servers', 'server_', 'server_id', 'server_name');
             if (updateStatus('fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'servers', $server_id, 'server_', 'deleted', 'server_id')) {
                 addLogEntry(sprintf(__("Server '%s' (%s) was deleted"), $tmp_name, $server_serial_no));
                 return true;
             }
         }
         return __('This server could not be deleted.');
     } else {
         basicGet('fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'server_groups', $server_id, 'group_', 'group_id');
         if ($fmdb->num_rows) {
             /** Update all associated domains */
             $query = "SELECT domain_id,domain_name_servers FROM `fm_{$__FM_CONFIG['fmDNS']['prefix']}domains` WHERE (`domain_name_servers` LIKE '%;g_{$server_id};%' OR `domain_name_servers` LIKE '%;g_{$server_id}' OR `domain_name_servers` LIKE 'g_{$server_id};%' OR `domain_name_servers`='g_{$server_id}') AND `account_id`='{$_SESSION['user']['account_id']}'";
             $fmdb->query($query);
             if ($fmdb->num_rows) {
                 $result = $this->updateNameServerAssignments($fmdb->last_result, $fmdb->num_rows, 'g_' . $server_id);
                 if ($result !== true) {
                     return $result;
                 }
             }
             /** Delete group */
             $tmp_name = getNameFromID($server_id, 'fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'server_groups', 'group_', 'group_id', 'group_name');
             if (updateStatus('fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'server_groups', $server_id, 'group_', 'deleted', 'group_id')) {
                 addLogEntry(sprintf(__("Server group '%s' was deleted."), $tmp_name));
                 return true;
             }
         }
         return __('This server group could not be deleted.');
     }
     return __('There is something wrong with your request.');
 }
开发者ID:pclemot,项目名称:facileManager,代码行数:59,代码来源:class_servers.php

示例12: delete

 /**
  * Deletes the selected template
  */
 function delete($id, $table, $prefix)
 {
     global $fmdb, $__FM_CONFIG;
     $tmp_name = getNameFromID($id, 'fm_' . $__FM_CONFIG['fmDNS']['prefix'] . $table, $prefix . '_', $prefix . '_id', $prefix . '_name');
     if (updateStatus('fm_' . $__FM_CONFIG['fmDNS']['prefix'] . $table, $id, $prefix . '_', 'deleted', $prefix . '_id') === false) {
         return __('This template could not be deleted because a database error occurred.');
     } else {
         addLogEntry("Deleted {$prefix} template '{$tmp_name}'.");
         return true;
     }
 }
开发者ID:pclemot,项目名称:facileManager,代码行数:14,代码来源:class_templates.php

示例13: Status

{
    $s = new Status();
    return $s->getFields();
}
/* </functions> */
$action = Functions::get('action');
Functions::checkRights(__FILE__, $action, Functions::get('token'));
switch ($action) {
    case 'fields_info':
        $data = infoFields();
        break;
    case 'new':
        $data = addStatus();
        break;
    case 'update':
        $data = updateStatus(Functions::get('id'));
        break;
    case 'info':
        $data = infoStatus(Functions::get('id'));
        break;
    case 'delete':
        $data = deleteStatus(Functions::get('id'));
        break;
    case 'list':
        $data = listStatuses();
        break;
    default:
        Functions::setResponse(400);
}
/* </controller> */
loadview('json', $data);
开发者ID:Babaritech,项目名称:babar2,代码行数:31,代码来源:status.php

示例14: delete

 /**
  * Deletes the selected object
  */
 function delete($object_id)
 {
     global $fmdb, $__FM_CONFIG;
     /** Does the object_id exist for this account? */
     basicGet('fm_' . $__FM_CONFIG[$_SESSION['module']]['prefix'] . 'objects', $object_id, 'object_', 'object_id');
     if ($fmdb->num_rows) {
         /** Is the object_id present in a policy? */
         if (isItemInPolicy($object_id, 'object')) {
             return __('This object could not be deleted because it is associated with one or more policies.');
         }
         /** Delete object */
         $tmp_name = getNameFromID($object_id, 'fm_' . $__FM_CONFIG[$_SESSION['module']]['prefix'] . 'objects', 'object_', 'object_id', 'object_name');
         if (updateStatus('fm_' . $__FM_CONFIG[$_SESSION['module']]['prefix'] . 'objects', $object_id, 'object_', 'deleted', 'object_id')) {
             addLogEntry(sprintf(__('Object (%s) was deleted.'), $tmp_name));
             return true;
         }
     }
     return __('This object could not be deleted.');
 }
开发者ID:pclemot,项目名称:facileManager,代码行数:22,代码来源:class_objects.php

示例15: array

    if (isset($token) && $token != "") {
        $config = array('client_Id' => APIKEY, 'redirect_uri' => REDIRECT_URL, 'client_Secret' => SECRET, 'url' => $_SESSION['shop']);
        $productFeed = new Shopify($config);
        $response = $productFeed->setAccessToken($token);
        if ($response['status']) {
        } else {
            echo $response['error'];
            die;
        }
        /* echo "<pre>";
        		print_r($productFeed); */
    }
    //$pixel = $_POST['dPixel'];
    //$catalog = $_POST['dCatalog'];
    $status = 0;
    $data = array('store_URL' => $_SESSION['shop'], 'status' => $status);
    $response = updateStatus($data);
    $themescript = "pixelTheme.liquid";
    $productscript = "pixelProduct.liquid";
    $cartscript = "pixelCart.liquid";
    $pixelThemeScript = "";
    $pixelProductScript = "";
    $pixelCartScript = "";
    $productFeed->createAssets($themescript, $pixelThemeScript);
    $productFeed->createAssets($productscript, $pixelProductScript);
    $productFeed->createAssets($cartscript, $pixelCartScript);
    $response = $productFeed->copyputThemeliquid();
    $response = $productFeed->copyputCartliquid();
    $response = $productFeed->copyputProductliquid();
    echo "Pixel Successfully Uninstalled";
}
开发者ID:borisnogindev,项目名称:Product-Feed,代码行数:31,代码来源:process.php


注:本文中的updateStatus函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。