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


PHP displayInfo函数代码示例

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


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

示例1: perform

 function perform()
 {
     WorkbenchContext::get()->getApexConnection()->setDebugLevels($this->logCategory, $this->logCategoryLevel);
     $executeAnonymousResultWithDebugLog = WorkbenchContext::get()->getApexConnection()->executeAnonymous($this->executeAnonymousBlock);
     ob_start();
     if ($executeAnonymousResultWithDebugLog->executeAnonymousResult->success) {
         if (isset($executeAnonymousResultWithDebugLog->debugLog) && $executeAnonymousResultWithDebugLog->debugLog != "") {
             print "<pre>" . addLinksToIds(htmlspecialchars($executeAnonymousResultWithDebugLog->debugLog, ENT_QUOTES)) . '</pre>';
         } else {
             displayInfo("Execution was successful, but returned no results. Confirm log category and level.");
         }
     } else {
         $error = null;
         if (isset($executeAnonymousResultWithDebugLog->executeAnonymousResult->compileProblem)) {
             $error .= "COMPILE ERROR: " . $executeAnonymousResultWithDebugLog->executeAnonymousResult->compileProblem;
         }
         if (isset($executeAnonymousResultWithDebugLog->executeAnonymousResult->exceptionMessage)) {
             $error .= "\nEXCEPTION: " . $executeAnonymousResultWithDebugLog->executeAnonymousResult->exceptionMessage;
         }
         if (isset($executeAnonymousResultWithDebugLog->executeAnonymousResult->exceptionStackTrace)) {
             $error .= "\nSTACKTRACE: " . $executeAnonymousResultWithDebugLog->executeAnonymousResult->exceptionStackTrace;
         }
         if (isset($executeAnonymousResultWithDebugLog->executeAnonymousResult->line)) {
             $error .= "\nLINE: " . $executeAnonymousResultWithDebugLog->executeAnonymousResult->line;
         }
         if (isset($executeAnonymousResultWithDebugLog->executeAnonymousResult->column)) {
             $error .= " COLUMN: " . $executeAnonymousResultWithDebugLog->executeAnonymousResult->column;
         }
         displayError($error);
         print '<pre style="color: red;">' . addLinksToIds(htmlspecialchars($executeAnonymousResultWithDebugLog->debugLog, ENT_QUOTES)) . '</pre>';
     }
     $result = ob_get_contents();
     ob_end_clean();
     return $result;
 }
开发者ID:sivarajankumar,项目名称:forceworkbench,代码行数:35,代码来源:ApexExecuteFutureTask.php

示例2: responseWrapper

/**
 * A helper function to catch exception and errors
 *
 * @param $request
 * @param Closure $closure
 */
function responseWrapper($request, \Closure $closure)
{
    $error = $response = null;
    try {
        $response = $closure($request);
    } catch (\Icepay\Api\Exception\BadResponseException $e) {
        $error = $e->getMessage();
        $response = $e->getResponseObject();
    } catch (\Icepay\Api\Exception\SoapFaultException $e) {
        $error = $e->getMessage();
        $response = $e->getPrevious();
    } catch (Exception $e) {
        $error = $e->getMessage();
    }
    displayInfo($response, $request, $error);
}
开发者ID:boekkooi,项目名称:icepay,代码行数:22,代码来源:common.php

示例3: handleUserMgmt

function handleUserMgmt()
{
    global $urlRequestRoot, $cmsFolder, $moduleFolder, $templateFolder, $sourceFolder;
    require_once "{$sourceFolder}/{$moduleFolder}/form/viewregistrants.php";
    if (isset($_GET['userid'])) {
        $_GET['userid'] = escape($_GET['userid']);
    }
    if (isset($_POST['editusertype'])) {
        $_POST['editusertype'] = escape($_POST['editusertype']);
    }
    if (isset($_POST['user_selected_activate'])) {
        foreach ($_POST as $key => $var) {
            if (substr($key, 0, 9) == "selected_") {
                if (!mysql_query("UPDATE " . MYSQL_DATABASE_PREFIX . "users SET user_activated=1 WHERE user_id='" . substr($key, 9) . "'")) {
                    $result = mysql_query("SELECT `user_fullname` FROM `" . MYSQL_DATABASE_PREFIX . "users` WHERE `user_id`='" . substr($key, 9) . "'");
                    if ($result) {
                        $row = mysql_fetch_assoc($result);
                        displayerror("Couldn't activate user, {$row['user_fullname']}");
                    }
                }
            }
        }
        return registeredUsersList($_POST['editusertype'], "edit", false);
    }
    if (isset($_POST['user_selected_deactivate'])) {
        foreach ($_POST as $key => $var) {
            if (substr($key, 0, 9) == "selected_") {
                if ((int) substr($key, 9) == ADMIN_USERID) {
                    displayerror("You cannot deactivate administrator!");
                    continue;
                }
                if (!mysql_query("UPDATE " . MYSQL_DATABASE_PREFIX . "users SET user_activated=0 WHERE user_id='" . substr($key, 9) . "'")) {
                    $result = mysql_query("SELECT `user_fullname` FROM `" . MYSQL_DATABASE_PREFIX . "users` WHERE `user_id`='" . substr($key, 9) . "'");
                    if ($result) {
                        $row = mysql_fetch_assoc($result);
                        displayerror("Couldn't deactivate user, {$row['user_fullname']}");
                    }
                }
            }
        }
        return registeredUsersList($_POST['editusertype'], "edit", false);
    }
    if (isset($_POST['user_selected_delete'])) {
        $done = true;
        foreach ($_POST as $key => $var) {
            if (substr($key, 0, 9) == "selected_") {
                if ((int) substr($key, 9) == ADMIN_USERID) {
                    displayerror("You cannot delete administrator!");
                    continue;
                }
                $query = "DELETE FROM `" . MYSQL_DATABASE_PREFIX . "users` WHERE `user_id` = '" . substr($key, 9) . "'";
                if (mysql_query($query)) {
                    $query = "DELETE FROM `" . MYSQL_DATABASE_PREFIX . "openid_users` WHERE `user_id` = '" . substr($key, 9) . "'";
                    if (!mysql_query($query)) {
                        $done = false;
                    }
                } else {
                    $done = false;
                }
            }
        }
        if (!$done) {
            displayerror("Some problem in deleting selected users");
        }
        return registeredUsersList($_POST['editusertype'], "edit", false);
    }
    if (isset($_POST['user_activate'])) {
        $query = "UPDATE " . MYSQL_DATABASE_PREFIX . "users SET user_activated=1 WHERE user_id='{$_GET['userid']}'";
        if (mysql_query($query)) {
            displayInfo("User Successfully Activated!");
        } else {
            displayerror("User Not Activated!");
        }
        return registeredUsersList($_POST['editusertype'], "edit", false);
    } else {
        if (isset($_POST['activate_all_users'])) {
            $query = "UPDATE " . MYSQL_DATABASE_PREFIX . "users SET user_activated=1";
            if (mysql_query($query)) {
                displayInfo("All users activated successfully!");
            } else {
                displayerror("Users Not Deactivated!");
            }
            return;
        } else {
            if (isset($_POST['user_deactivate'])) {
                if ($_GET['userid'] == ADMIN_USERID) {
                    displayError("You cannot deactivate administrator!");
                    return registeredUsersList($_POST['editusertype'], "edit", false);
                }
                $query = "UPDATE " . MYSQL_DATABASE_PREFIX . "users SET user_activated=0 WHERE user_id='{$_GET['userid']}'";
                if (mysql_query($query)) {
                    displayInfo("User Successfully Deactivated!");
                } else {
                    displayerror("User Not Deactivated!");
                }
                return registeredUsersList($_POST['editusertype'], "edit", false);
            } else {
                if (isset($_POST['deactivate_all_users'])) {
                    $query = "UPDATE " . MYSQL_DATABASE_PREFIX . "users SET user_activated=0 WHERE user_id != " . ADMIN_USERID;
                    if (mysql_query($query)) {
//.........这里部分代码省略.........
开发者ID:ksb1712,项目名称:pragyan,代码行数:101,代码来源:users.lib.php

示例4: get_template_part

} else {
    get_template_part('content', 'none');
}
?>

		</main><!-- .site-main -->
	</div><!-- .content-area -->



<!-- NEW -->
<?php 
// echo 'TITLU: '.getFilmTitle(1).'<br/>';
// echo 'RAND: '; // s.getFilmInfo(1).'<br/>';
// print_r(getFilmInfo(1));
//  print_r(getFilmTitleCol());
$as = getSheetAsArray();
// var_dump($as);
echo '<br/>';
displayInfo();
echo '<br/>';
echo '<br/>';
echo '<br/>';
$titles = getTitles();
print_r($titles);
// getPostIdsByCustomFields();
?>
<!-- END NEW -->

<?php 
get_footer();
开发者ID:spyre,项目名称:emiral,代码行数:31,代码来源:index.php

示例5: displayInfo

<?php

require_once 'session.php';
require_once 'shared.php';
require_once 'header.php';
if (isset($cacheCleared)) {
    displayInfo("Cache Cleared Successfully");
    print "<p/>";
}
if (isset($_REQUEST['keyPrefix']) || isset($_REQUEST['id'])) {
    $keyPrefixOrId = isset($_REQUEST['keyPrefix']) ? $_REQUEST['keyPrefix'] : $_REQUEST['id'];
    $specifiedType = WorkbenchContext::get()->getObjectTypeByKeyPrefixOrId(trim($keyPrefixOrId));
    if ($specifiedType == null) {
        displayWarning("Unknown object type");
    }
    WorkbenchContext::get()->setDefaultObject($specifiedType);
}
?>

<p class='instructions'>Choose an object to describe:</p>

<form name='describeForm' method='POST' action='describe.php'>
    <?php 
printObjectSelection(WorkbenchContext::get()->getDefaultObject(), 'default_object', 30, "onChange=\"document.getElementById('loadingMessage').style.visibility='visible'; document.describeForm.submit();\"");
?>

    <span id='loadingMessage' style='visibility:hidden; color:#888;'>
        &nbsp;&nbsp;<img src='<?php 
print getPathToStaticResource('/images/wait16trans.gif');
?>
' align='absmiddle'/> Loading...
开发者ID:neftcorp,项目名称:forceworkbench,代码行数:31,代码来源:describe.php

示例6: validateZipFile

        $validationErrors = validateZipFile($_FILES["deployFile"]);
        if ($validationErrors) {
            displayError($validationErrors, true, true);
            exit;
        }
        $deployFileTmpName = $_FILES["deployFile"]["tmp_name"];
        $deployFileContents = file_get_contents($deployFileTmpName);
        if (!isset($deployFileContents) || !$deployFileContents) {
            displayError("Unknown error reading file contents.", true, true);
            exit;
        }
        $_SESSION[$deployFileTmpName] = $deployFileContents;
        $_SESSION[$deployFileTmpName . "_OPTIONS"] = deserializeDeployOptions($_POST);
        require_once 'header.php';
        print "<p/>";
        displayInfo("Successfully staged " . ceil($_FILES["deployFile"]["size"] / 1024) . " KB zip file " . $_FILES["deployFile"]["name"] . " for deployment.", true, false);
        ?>
<p class='instructions'>Confirm the following deployment options:</p>
<form id='deployForm' name='deployForm' method='POST'
    action=''>
    <?php 
        print getCsrfFormTag();
        ?>
    <input type='hidden' name='deployFileTmpName' value='<?php 
        print $deployFileTmpName;
        ?>
' />
<p />
    <?php 
        $tree = new ExpandableTree("deployOptionsTree", $_SESSION[$deployFileTmpName . "_OPTIONS"]);
        $tree->setForceCollapse(true);
开发者ID:sivarajankumar,项目名称:forceworkbench,代码行数:31,代码来源:metadataDeploy.php

示例7: getMessages

 function getMessages()
 {
     $messages = "";
     ob_start();
     if (count($this->errors) > 0) {
         displayError($this->errors);
     }
     if (count($this->infos) > 0) {
         displayInfo($this->infos);
     }
     $messages .= ob_get_clean();
     $messages .= "<div id='partialSavedTopic' style='display:none;'>";
     if (count($this->errors) > 0) {
         $messages .= $this->selectedTopic->toJson();
     }
     $messages .= "</div>";
     return $messages;
 }
开发者ID:neftcorp,项目名称:forceworkbench,代码行数:18,代码来源:StreamingController.php

示例8: drawPageTitle

function drawPageTitle($title, $message = null, $message_type = '')
{
    echo '<div class="HeaderPageTitle">' . $title . '</div>';
    echo '<div class="Content">';
    if ($message != null) {
        if ($message_type == '') {
            $message_type = 'error';
        }
        if (strtolower($message_type) == 'error') {
            displayErrors($message);
        } elseif (strtolower($message_type) == 'system') {
            displayMessage($message);
        } elseif (strtolower($message_type) == 'tip') {
            displayTip($message);
        } else {
            displayInfo($message);
        }
    }
}
开发者ID:seans888,项目名称:Bgy-Project,代码行数:19,代码来源:SCV2_LibHTML.php

示例9: displayQueryForm

function displayQueryForm($queryRequest)
{
    registerShortcut("Ctrl+Alt+W", "addFilterRow(document.getElementById('numFilters').value++);" . "toggleFieldDisabled();");
    if ($queryRequest->getObject()) {
        $describeSObjectResult = WorkbenchContext::get()->describeSObjects($queryRequest->getObject());
        $fieldValuesToLabels = array();
        foreach ($describeSObjectResult->fields as $field) {
            $fieldValuesToLabels[$field->name] = $field->name;
        }
    } else {
        displayInfo('First choose an object to use the SOQL builder wizard.');
    }
    print "<script type='text/javascript'>\n";
    print "var field_type_array = new Array();\n";
    if (isset($describeSObjectResult)) {
        foreach ($describeSObjectResult->fields as $fields => $field) {
            print " field_type_array[\"{$field->name}\"]=[\"{$field->type}\"];\n";
        }
    }
    $ops = array('=' => '=', '!=' => '&ne;', '<' => '&lt;', '<=' => '&le;', '>' => '&gt;', '>=' => '&ge;', 'starts' => 'starts with', 'ends' => 'ends with', 'contains' => 'contains', 'IN' => 'in', 'NOT IN' => 'not in', 'INCLUDES' => 'includes', 'EXCLUDES' => 'excludes');
    print "var compOper_array = new Array();\n";
    foreach ($ops as $opValue => $opLabel) {
        print " compOper_array[\"{$opValue}\"]=[\"{$opLabel}\"];\n";
    }
    print "</script>\n";
    print "<script src='" . getPathToStaticResource('/script/query.js') . "' type='text/javascript'></script>\n";
    print "<form method='POST' id='query_form' name='query_form' action='query.php'>\n";
    print "<input type='hidden' name='justUpdate' value='0' />";
    print "<input type='hidden' id='numFilters' name='numFilters' value='" . count($queryRequest->getFilters()) . "' />";
    print "<p class='instructions'>Choose the object, fields, and critera to build a SOQL query below:</p>\n";
    print "<table border='0' style='width: 100%;'>\n";
    print "<tr><td valign='top' width='1'>Object:";
    printObjectSelection($queryRequest->getObject(), 'QB_object_sel', "16", "onChange='updateObject();'", "queryable");
    print "<p/>Fields:<select id='QB_field_sel' name='QB_field_sel[]' multiple='mutliple' size='4' style='width: 16em;' onChange='buildQuery();'>\n";
    if (isset($describeSObjectResult)) {
        print " <option value='count()'";
        if ($queryRequest->getFields() != null) {
            //check to make sure something is selected; otherwise warnings will display
            foreach ($queryRequest->getFields() as $selectedField) {
                if ('count()' == $selectedField) {
                    print " selected='selected' ";
                }
            }
        }
        print ">count()</option>\n";
        //print ">$field->name</option>\n";
        foreach ($describeSObjectResult->fields as $fields => $field) {
            print " <option value='{$field->name}'";
            if ($queryRequest->getFields() != null) {
                //check to make sure something is selected; otherwise warnings will display
                foreach ($queryRequest->getFields() as $selectedField) {
                    if ($field->name == $selectedField) {
                        print " selected='selected' ";
                    }
                }
            }
            print ">{$field->name}</option>\n";
        }
    }
    print "</select></td>\n";
    print "<td valign='top'>";
    print "<table border='0' align='right' style='width:100%'>\n";
    print "<tr><td valign='top' colspan=2>View as:<br/>" . "<label><input type='radio' id='export_action_screen' name='export_action' value='screen' ";
    if ($queryRequest->getExportTo() == 'screen') {
        print "checked='true'";
    }
    print " onClick='toggleMatrixSortSelectors(true);'>List</label>&nbsp;";
    print "<label><input type='radio' id='export_action_matrix' name='export_action' value='matrix' ";
    if ($queryRequest->getExportTo() == 'matrix') {
        print "checked='true'";
    }
    print " onClick='toggleMatrixSortSelectors(true);'>Matrix</label>";
    if (WorkbenchConfig::get()->value("allowQueryCsvExport")) {
        print "<label><input type='radio' id='export_action_csv' name='export_action' value='csv' ";
        if ($queryRequest->getExportTo() == 'csv') {
            print "checked='true'";
        }
        print " onClick='toggleMatrixSortSelectors(true);'>CSV</label>&nbsp;";
    }
    print "<label><input type='radio' id='export_action_async_csv' name='export_action' value='async_CSV' ";
    if ($queryRequest->getExportTo() == 'async_CSV') {
        print "checked='true'";
    }
    print " onClick='toggleMatrixSortSelectors(true);'>Bulk CSV</label>&nbsp;";
    print "<label><input type='radio' id='export_action_async_xml' name='export_action' value='async_XML' ";
    if ($queryRequest->getExportTo() == 'async_XML') {
        print "checked='true'";
    }
    print " onClick='toggleMatrixSortSelectors(true);'>Bulk XML</label>&nbsp;";
    print "<td valign='top' colspan=2>Deleted and archived records:<br/>" . "<label><input type='radio' name='query_action' value='Query' ";
    if ($queryRequest->getQueryAction() == 'Query') {
        print "checked='true'";
    }
    print " >Exclude</label>&nbsp;";
    print "<label><input type='radio' name='query_action' value='QueryAll' ";
    if ($queryRequest->getQueryAction() == 'QueryAll') {
        print "checked='true'";
    }
    print " >Include</label></td></tr></table>\n";
    print "<table id='QB_right_sub_table' border='0' align='right' style='width:100%'>\n";
//.........这里部分代码省略.........
开发者ID:neftcorp,项目名称:forceworkbench,代码行数:101,代码来源:query.php

示例10: die

                    } else {
                        die('Error getting columns of table: ' . $mysqli->error());
                    }
                }
                $time_end = microtime(true);
                $process_time = $time_end - $time_start;
                //Draw success page.
                drawHeader();
                drawPageTitle('Successfully Imported Tables', '<br>Cobalt successfully imported the tables you have chosen.
                               The process took ' . number_format($process_time, 5, '.', ',') . ' seconds.<br><br>
                               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                               <input type=submit name=BACK value=BACK>', 'system');
                if ($errMsg != '') {
                    displayInfo('<b>Table Import Notes:</b> <br />' . $errMsg);
                }
                drawFooter();
                die;
            }
        }
    }
}
drawHeader();
if ($errMsg == '') {
    $errMsg = 'Cobalt will import all tables it can find using the database connection you specify.';
    $msgType = 'info';
}
drawPageTitle('Import Tables', $errMsg, $msgType);
?>
开发者ID:seans888,项目名称:Bgy-Project,代码行数:30,代码来源:Import_Tables.php

示例11: displayQueryForm

function displayQueryForm($queryRequest)
{
    registerShortcut("Ctrl+Alt+W", "addFilterRow(document.getElementById('numFilters').value++);" . "toggleFieldDisabled();");
    if ($queryRequest->getObject()) {
        $describeSObjectResult = WorkbenchContext::get()->describeSObjects($queryRequest->getObject());
        $fieldValuesToLabels = array();
        foreach ($describeSObjectResult->fields as $field) {
            $fieldValuesToLabels[$field->name] = $field->name;
        }
    } else {
        displayInfo('First choose an object to use the SOQL builder wizard.');
    }
    print "<script>\n";
    print "var field_type_array = new Array();\n";
    if (isset($describeSObjectResult)) {
        foreach ($describeSObjectResult->fields as $fields => $field) {
            print " field_type_array[\"{$field->name}\"]=[\"{$field->type}\"];\n";
        }
    }
    $ops = array('=' => '=', '!=' => '&ne;', '<' => '&lt;', '<=' => '&le;', '>' => '&gt;', '>=' => '&ge;', 'starts' => 'starts with', 'ends' => 'ends with', 'contains' => 'contains', 'IN' => 'in', 'NOT IN' => 'not in', 'INCLUDES' => 'includes', 'EXCLUDES' => 'excludes');
    print "var compOper_array = new Array();\n";
    foreach ($ops as $opValue => $opLabel) {
        print " compOper_array[\"{$opValue}\"]=[\"{$opLabel}\"];\n";
    }
    print <<<QUERY_BUILDER_SCRIPT

function parentChildRelationshipQueryBlocker() {
    var soql = document.getElementById('soql_query_textarea').value.toUpperCase();
    
    if (soql.indexOf('(SELECT') != -1 && soql.indexOf('IN (SELECT') == -1 && document.getElementById('export_action_csv').checked) {
        return confirm ("Export of parent-to-child relationship queries to CSV are not yet supported by Workbench and may give unexpected results. Are you sure you wish to continue?");
    }
    
}

function doesQueryHaveName() {
    var saveQr = document.getElementById('saveQr');
    if (saveQr.value == null || saveQr.value.length == 0) {
        alert('Query must have a name to save.');
        return false;
    }    
    
    return true;
}


function toggleFieldDisabled() {
    var QB_field_sel = document.getElementById('QB_field_sel');

    if (document.getElementById('QB_object_sel').value) {
        QB_field_sel.disabled = false;
    } else {
        QB_field_sel.disabled = true;
    }


    var isFieldSelected = false;
    for (var i = 0; i < QB_field_sel.options.length; i++)
        if (QB_field_sel.options[i].selected)
            isFieldSelected = true;
            
    if (isFieldSelected || (document.getElementById('matrix_rows').value != '' && document.getElementById('matrix_cols').value != '')) {
            document.getElementById('QB_orderby_field').disabled = false;
            document.getElementById('QB_orderby_sort').disabled = false;
            document.getElementById('QB_nulls').disabled = false;
            document.getElementById('QB_limit_txt').disabled = false;
            
            document.getElementById('QB_filter_field_0').disabled = false;
            if (document.getElementById('QB_filter_field_0').value) {
                document.getElementById('QB_filter_value_0').disabled = false;
                document.getElementById('QB_filter_compOper_0').disabled = false;
            } else {
                document.getElementById('QB_filter_value_0').disabled = true;
                document.getElementById('QB_filter_compOper_0').disabled = true;
            }
    } else {
            document.getElementById('QB_filter_field_0').disabled = true;
            document.getElementById('QB_filter_compOper_0').disabled = true;
            document.getElementById('QB_filter_value_0').disabled = true;
            document.getElementById('QB_orderby_field').disabled = true;
            document.getElementById('QB_orderby_sort').disabled = true;
            document.getElementById('QB_nulls').disabled = true;
            document.getElementById('QB_limit_txt').disabled = true;
    }

    var allPreviousRowsUsed = true;
    for (var r = 1; r < document.getElementById('numFilters').value; r++) {
        var lastRow = r-1;
        var thisRow = r;
        
        if (isFieldSelected && allPreviousRowsUsed && document.getElementById('QB_filter_field_' + lastRow).value && document.getElementById('QB_filter_compOper_' + lastRow).value && document.getElementById('QB_filter_value_' + lastRow).value) {
            document.getElementById('QB_filter_field_' + thisRow).disabled = false;
            if (document.getElementById('QB_filter_field_' + thisRow).value) {
                document.getElementById('QB_filter_value_' + thisRow).disabled = false;
                document.getElementById('QB_filter_compOper_' + thisRow).disabled = false;
            } else {
                document.getElementById('QB_filter_value_' + thisRow).disabled = true;
                document.getElementById('QB_filter_compOper_' + thisRow).disabled = true;
            }
        } else {
//.........这里部分代码省略.........
开发者ID:robbyrob42,项目名称:forceworkbench,代码行数:101,代码来源:query.php

示例12: setcookie

                //for null or non-overriding strings and numbers (remove cookie)
                setcookie($configKey, NULL, time() - 3600);
            }
        }
    }
    if (WorkbenchContext::isEstablished()) {
        WorkbenchContext::get()->clearCache();
    }
    header("Location: " . htmlspecialchars($_SERVER['PHP_SELF']) . "?saved=" . (isset($_POST['restoreDefaults']) ? "D" : "S"));
}
require_once 'header.php';
if (isset($errors)) {
    displayError($errors);
} else {
    if (isset($_GET['saved'])) {
        displayInfo(($_GET['saved'] == "D" ? "Defaults restored" : "Settings saved") . " successfully.");
    }
}
if (isLoggedIn()) {
    $unsupportedConfigs = array();
    foreach (WorkbenchConfig::get()->entries() as $configKey => $configValue) {
        if (isset($configValue['minApiVersion']) && !WorkbenchContext::get()->isApiVersionAtLeast($configValue['minApiVersion'])) {
            $unsupportedConfigs[] = $configValue['label'] . sprintf(" (Requires %01.1f)", $configValue['minApiVersion']);
        }
    }
    if (count($unsupportedConfigs) > 0) {
        print "<p/>";
        displayWarning(array_merge(array("The following settings will be ignored for your current API version " . WorkbenchContext::get()->getApiVersion() . ":"), $unsupportedConfigs));
        print "<p/><em style='color: orange;'>Quick Fix: <a style='color: orange;' href='sessionInfo.php' target='_blank'>Change API Version</a></em>";
    }
}
开发者ID:neftcorp,项目名称:forceworkbench,代码行数:31,代码来源:settings.php

示例13: Cat

$cat1->setname("Zoe");
$cat1->setBreed("Siamese");
$myCats[] = $cat1;
$cat2 = new Cat();
$cat2->setColor("orange");
$cat2->setname("Garfield");
$cat2->setBreed("Sphynx");
$myCats[] = $cat2;
$cat3 = new Cat();
$cat3->setColor("tabby");
$cat3->setname("Fluffy");
$cat3->setBreed("Ragdoll");
$myCats[] = $cat3;
displayInfo($cat1);
displayInfo($cat2);
displayInfo($cat3);
CatListFun($myCats, "orange");
function displayInfo(Cat $n)
{
    echo $n->getName() . " is a " . $n->getColor() . " " . $n->getBreed() . " cat.</br> </br>";
}
function CatListFun($catsArray, $selectedColor)
{
    $colorCount = 0;
    for ($i = 0; $i < count($catsArray); $i++) {
        if ($catsArray[$i]->getColor() == $selectedColor) {
            $colorCount++;
        }
    }
    if ($colorCount == 1) {
        echo "There is " . $colorCount . " " . $selectedColor . " cat  .";
开发者ID:kumarsivarajan,项目名称:rmh-roomreservation-maker,代码行数:31,代码来源:CatListFun.php

示例14: session_unset

        if (isset($_SESSION['oauth']['serverUrlPrefix']) && !empty($_SESSION['oauth']['serverUrlPrefix'])) {
            $redirectTime = 5000;
            $uiLogoutIFrame = "<iframe src='" . $_SESSION['oauth']['serverUrlPrefix'] . "/secur/logout.jsp' width='0' height='0' style='display:none;'></iframe>\n";
        }
    } else {
        $apiSessionInvalidated = false;
    }
    session_unset();
    session_destroy();
    require_once 'header.php';
    print "<p/>";
    if (isset($uiLogoutIFrame)) {
        print $uiLogoutIFrame;
    }
    if (isset($_REQUEST['message'])) {
        $redirectTime = 5000;
        displayError("An error has occurred and you have been logged out:\n" . $_REQUEST['message']);
    } else {
        if ($apiSessionInvalidated) {
            displayInfo('You have been successfully logged out of Workbench and Salesforce.');
        } else {
            displayInfo('You have been successfully logged out of Workbench.');
        }
    }
    print "<script type='text/javascript'>setTimeout(\"location.href = 'login.php';\", {$redirectTime});</script>";
    include_once 'footer.php';
} else {
    session_unset();
    session_destroy();
    header('Location: login.php');
}
开发者ID:sivarajankumar,项目名称:forceworkbench,代码行数:31,代码来源:logout.php

示例15: displayForm

function displayForm($infos = null, $errors = null)
{
    if (isset($infos)) {
        displayInfo($infos);
    }
    if (isset($errors)) {
        displayError($errors);
    }
    ?>

<form name='passwordChange' method='post'
    action=''>
<?php 
    print getCsrfFormTag();
    ?>
<table border='0'>

    <tr>
        <td align='right' colspan='2'>
        <p><label><input type='radio' name='passwordChangeType'
            value='set' onclick="togglePasswordFields('set');"
            checked='checked' /> Set</label> &nbsp; <label><input
            type='radio' name='passwordChangeType' value='reset'
            onclick="togglePasswordFields('reset');" /> Reset</label></p>
        </td>
    </tr>

    <tr>
        <td><label for='userId'>User Id: &nbsp;</label></td>
        <td><input type='text' id='userId' name='userId' size='45' /></td>
    </tr>

    <tr>
        <td><label for='passwordOne'>Password: &nbsp;</label></td>
        <td><input type='password' id='passwordOne' name='passwordOne'
            size='45' onkeyup="doPasswordsMatch(false);" /></td>
    </tr>
    <tr>
        <td><label for='passwordConfirm'>Confirm Password: &nbsp;</label></td>
        <td><input type='password' id='passwordConfirm'
            name='passwordConfirm' size='45'
            onkeyup="doPasswordsMatch(false);" /></td>
    </tr>

    <tr>
        <td colspan='2' align='right'>
        <p><input type='submit' id='changePasswordAction'
            name='changePasswordAction' value='Change Password'
            onclick="return doPasswordsMatch(true);" /> <input
            type='button' value='Clear Form' onclick="clearForm();" /></p>
        </td>
    </tr>

</table>
</form>

<script type="text/javascript">
<!--
 
 function togglePasswordFields(changeType) {
 
     if (changeType == 'set') {
         document.getElementById('passwordOne').disabled = false;
         document.getElementById('passwordConfirm').disabled = false;
      } else if (changeType == 'reset') {
         document.getElementById('passwordOne').value = null;
         document.getElementById('passwordConfirm').value = null;
         
         document.getElementById('passwordOne').disabled = true;
         document.getElementById('passwordConfirm').disabled = true;
         
         document.getElementById('passwordOne').style.background = 'white';
         document.getElementById('passwordConfirm').style.background = 'white';
     }
     
 }
 
 
 function doPasswordsMatch(doAlert) {
      if (document.getElementById('passwordOne').value.length < document.getElementById('passwordConfirm').value.length) {     
          document.getElementById('passwordConfirm').style.background = 'LightPink';
      }
      
      if (doAlert && document.getElementById('passwordOne').value.length == 0 && document.getElementById('passwordOne').disabled == false) {     
           document.getElementById('passwordOne').style.background = 'LightPink';
            alert('Must provide a password if setting password; otherwise, choose reset');
            document.getElementById('passwordOne').focus();
           return false;
      } else {
          document.getElementById('passwordOne').style.background = 'white';
      }
      
 
      if (document.getElementById('passwordOne').value == document.getElementById('passwordConfirm').value) {
          document.getElementById('passwordConfirm').style.background = 'white';
        return true;
      } else {
           if (doAlert) {
               document.getElementById('passwordConfirm').style.background = 'LightPink';
               alert('Passwords do not match');
//.........这里部分代码省略.........
开发者ID:sivarajankumar,项目名称:forceworkbench,代码行数:101,代码来源:pwdMgmt.php


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