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


PHP updateInfo函数代码示例

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


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

示例1: updateInfo

function updateInfo($org, $id, $ans)
{
    $new = array();
    if ($id == $org['id']) {
        $org['funcion'] = $ans['funcion'];
        $org['titulo'] = $ans['titulo'];
        $org['glosa'] = $ans['glosa'];
        $org['url'] = $ans['url'];
        return $org;
    }
    $hijos = $org['hijos'];
    if ($hijos != array()) {
        foreach ($hijos as $X) {
            $new[] = updateInfo($X, $id, $ans);
        }
    }
    $org['hijos'] = $new;
    return $org;
}
开发者ID:e-gob,项目名称:GobiernoTransparente,代码行数:19,代码来源:common-org.php

示例2: dbUtil

function dbUtil($type, $paramList = null)
{
    global $retArray;
    try {
        $mongo = new MongoClient('mongodb://nb403:27127/admin:admin');
        $db = $mongo->adtestClassicBugs;
        if ($type == SaveCategory) {
            saveCategory($db, $paramList);
        } elseif ($type == ReadCategory) {
            return readCateList($db);
        } elseif ($type == SaveInputContent) {
            saveInputContent($db, $paramList);
        } elseif ($type == ReadAllContents) {
            return listContent($db);
        } elseif ($type == ReadSpecificContent) {
            return listContent2($db, $paramList);
        } elseif ($type == UpdateSpecificContent) {
            updateInfo($db, $paramList);
        }
    } catch (MongoConnectionException $e) {
        $retArray = array("1", $e->getMessage());
    }
}
开发者ID:sleepyycat,项目名称:WebFramework,代码行数:23,代码来源:dbUtil.php

示例3: isset

$smarty->assign('MODULE', $currentModule);
// TODO: Update Single Module Instance name here.
$smarty->assign('SINGLE_MOD', 'SINGLE_' . $currentModule);
$smarty->assign('CATEGORY', $category);
$smarty->assign("THEME", $theme);
$smarty->assign('IMAGE_PATH', "themes/{$theme}/images/");
$smarty->assign('ID', $focus->id);
$smarty->assign('MODE', $focus->mode);
$smarty->assign('CREATEMODE', isset($_REQUEST['createmode']) ? vtlib_purify($_REQUEST['createmode']) : '');
$smarty->assign('CHECK', Button_Check($currentModule));
$smarty->assign('DUPLICATE', $isduplicate);
if ($focus->mode == 'edit' || $isduplicate) {
    $recordName = array_values(getEntityName($currentModule, $record));
    $recordName = $recordName[0];
    $smarty->assign('NAME', $recordName);
    $smarty->assign('UPDATEINFO', updateInfo($record));
}
if ($focus->mode == 'edit') {
    $associated_prod = getAssociatedProducts("PurchaseOrder", $focus);
    $smarty->assign('ASSOCIATEDPRODUCTS', $associated_prod);
} elseif (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
    $smarty->assign('ASSOCIATEDPRODUCTS', $PO_associated_prod);
    $smarty->assign('AVAILABLE_PRODUCTS', 'true');
    $smarty->assign('MODE', $focus->mode);
}
if (isset($_REQUEST['return_module'])) {
    $smarty->assign("RETURN_MODULE", vtlib_purify($_REQUEST['return_module']));
} else {
    $smarty->assign("RETURN_MODULE", "PurchaseOrder");
}
if (isset($_REQUEST['return_action'])) {
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:31,代码来源:EditView.php

示例4: parse_calendardate

$smarty->assign("OP_MODE", $disp_view);
$smarty->assign("MODULE", $currentModule);
$smarty->assign("SINGLE_MOD", 'Vendor');
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("ID", $focus->id);
if (isset($focus->name)) {
    $smarty->assign("NAME", $focus->name);
}
if (isset($cust_fld)) {
    $smarty->assign("CUSTOMFIELD", $cust_fld);
}
$smarty->assign("CALENDAR_LANG", $app_strings['LBL_JSCALENDAR_LANG']);
$smarty->assign("CALENDAR_DATEFORMAT", parse_calendardate($app_strings['NTC_DATE_FORMAT']));
if ($focus->mode == 'edit') {
    $smarty->assign("UPDATEINFO", updateInfo($focus->id));
    $smarty->assign("MODE", $focus->mode);
}
if (isset($_REQUEST['return_module'])) {
    $smarty->assign("RETURN_MODULE", vtlib_purify($_REQUEST['return_module']));
}
if (isset($_REQUEST['return_action'])) {
    $smarty->assign("RETURN_ACTION", vtlib_purify($_REQUEST['return_action']));
}
if (isset($_REQUEST['return_id'])) {
    $smarty->assign("RETURN_ID", vtlib_purify($_REQUEST['return_id']));
}
if (isset($_REQUEST['return_viewname'])) {
    $smarty->assign("RETURN_VIEWNAME", vtlib_purify($_REQUEST['return_viewname']));
}
$smarty->assign("THEME", $theme);
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:31,代码来源:EditView.php

示例5: unset

    if (!$_SESSION['rlvs'][$currentModule]) {
        unset($_SESSION['rlvs']);
    }
    // Identify this module as custom module.
    $smarty->assign('CUSTOM_MODULE', true);
    $smarty->assign('APP', $app_strings);
    $smarty->assign('MOD', $mod_strings);
    $smarty->assign('MODULE', $currentModule);
    // TODO: Update Single Module Instance name here.
    $smarty->assign('SINGLE_MOD', getTranslatedString($currentModule));
    $smarty->assign('CATEGORY', $category);
    $smarty->assign('IMAGE_PATH', "themes/{$theme}/images/");
    $smarty->assign('THEME', $theme);
    $smarty->assign('ID', $focus->id);
    $smarty->assign('MODE', $focus->mode);
    $smarty->assign('CHECK', $tool_buttons);
    $smarty->assign('NAME', $focus->column_fields[$focus->def_detailview_recname]);
    $smarty->assign('UPDATEINFO', updateInfo($focus->id));
    // Module Sequence Numbering
    $mod_seq_field = getModuleSequenceField($currentModule);
    if ($mod_seq_field != null) {
        $mod_seq_id = $focus->column_fields[$mod_seq_field['name']];
    } else {
        $mod_seq_id = $focus->id;
    }
    $smarty->assign('MOD_SEQ_ID', $mod_seq_id);
    // END
    $related_array = getRelatedLists($currentModule, $focus);
    $smarty->assign('RELATEDLISTS', $related_array);
    $smarty->display('RelatedLists.tpl');
}
开发者ID:vtiger-jp,项目名称:vtigercrm-5.1.x-ja,代码行数:31,代码来源:CallRelatedList.php

示例6: session_start

<?php

session_start();
require '../model/db.php';
require 'define.php';
if (isset($_POST['editInfo'])) {
    $name = $_POST['userName'];
    $email = $_POST['email'];
    $contact = $_POST['contact'];
    $user = $_SESSION['user'];
    $userId = $_SESSION['id'];
    $exp = explode(" ", $name);
    $fname = $exp[0];
    $lname = '';
    for ($i = 1; $i < count($exp); $i++) {
        $lname .= $exp[$i] . ' ';
    }
    if (!checkEditedEmail($email, $userId)) {
        updateInfo($fname, $lname, $email, $contact, $user);
        echo '<script language="javascript">
                        alert("Successfully Updated !!");
                        window.location="' . SERVER . '/profile";
                      </script>';
    } else {
        echo '<script language="javascript">
                        alert("Email has been used by another user !!");
                        window.location="' . SERVER . '/editProfile";
                      </script>';
    }
}
开发者ID:salehOyon,项目名称:Convention-Hall,代码行数:30,代码来源:editInfoSuccess.php

示例7: array

    $organik['glosa'] = "";
    $organik['id'] = 1;
    $organik['hijos'] = array();
    $organik['url'] = "";
}
if (isset($_GET['n']) && isset($_GET['q'])) {
    if ($_GET['q'] == 'new') {
        $organik = addChild($organik, $_GET['n']);
    }
    if ($_GET['q'] == 'del') {
        $organik = deleteNode($organik, $_GET['n']);
    }
}
if (isset($_POST['funcion'])) {
    $info = array('funcion' => $_POST['funcion'], 'titulo' => $_POST['titulo'], 'glosa' => $_POST['glosa'], 'url' => $_POST['url']);
    $organik = updateInfo($organik, $_POST['id'], $info);
}
$_SESSION['data'] = $organik;
org_header("Editor de Estructuras Org&aacute;nicas");
?>

<form action="organica-d.php" method="post">
<input type="button" value="Volver"
onclick="location.href='organica2.php';" />
<input type="button" value="Generar"
onclick="location.href='organica-d.php';" />
</form>


<?php 
echo toListaEditor2($organik, "fin");
开发者ID:e-gob,项目名称:GobiernoTransparente,代码行数:31,代码来源:organica2-b.php

示例8: vtigerCRM_Smarty

$smarty = new vtigerCRM_Smarty();
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$focus->id = $_REQUEST['record'];
if (isset($focus->name)) {
    $smarty->assign("NAME", $focus->name);
} else {
    $smarty->assign("NAME", "");
}
$smarty->assign("BLOCKS", getBlocks($currentModule, "detail_view", '', $focus->column_fields));
$smarty->assign("TICKETID", vtlib_purify($_REQUEST['record']));
$smarty->assign("CUSTOMFIELD", $cust_fld);
$smarty->assign("SINGLE_MOD", 'HelpDesk');
$category = getParentTab();
$smarty->assign("CATEGORY", $category);
$smarty->assign("UPDATEINFO", updateInfo($_REQUEST['record']));
if (isPermitted("HelpDesk", "EditView", $_REQUEST['record']) == 'yes') {
    $smarty->assign("EDIT_DUPLICATE", "permitted");
}
if (isPermitted("HelpDesk", "Delete", $_REQUEST['record']) == 'yes') {
    $smarty->assign("DELETE", "permitted");
}
//Added button for Convert the ticket to FAQ
if (isPermitted("Faq", "EditView", '') == 'yes') {
    $smarty->assign("CONVERTASFAQ", "permitted");
}
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", $image_path);
$smarty->assign("PRINT_URL", "phprint.php?jt=" . session_id() . $GLOBALS['request_string']);
// Module Sequence Numbering
$mod_seq_field = getModuleSequenceField($currentModule);
开发者ID:vtiger-jp,项目名称:vtigercrm-5.1.x-ja,代码行数:31,代码来源:DetailView.php

示例9: RedisQueue

<?php

require_once '../init.php';
$queueInfo = new RedisQueue('queueInfo');
$queueSocial = new RedisQueue('queueSocial');
$queueStats = new RedisQueue('queueStats');
$killmails = $mdb->getCollection('killmails');
$rawmails = $mdb->getCollection('rawmails');
$information = $mdb->getCollection('information');
$statArray = ['characterID', 'corporationID', 'allianceID', 'factionID', 'shipTypeID', 'groupID'];
while (!Util::exitNow()) {
    $killID = $queueInfo->pop();
    if ($killID !== null) {
        updateInfo($killID);
        updateStatsQueue($killID);
        $queueSocial->push($killID);
    }
}
function updateStatsQueue($killID)
{
    global $killmails, $statArray, $queueStats;
    $kill = $killmails->findOne(['killID' => $killID]);
    $involved = $kill['involved'];
    $sequence = $kill['sequence'];
    // solar system
    addToStatsQueue('solarSystemID', $kill['system']['solarSystemID'], $sequence);
    addToStatsQueue('regionID', $kill['system']['regionID'], $sequence);
    foreach ($involved as $inv) {
        foreach ($statArray as $stat) {
            if (isset($inv[$stat])) {
                addToStatsQueue($stat, $inv[$stat], $sequence);
开发者ID:WreckerWorld,项目名称:zKillboard,代码行数:31,代码来源:4.queueInfo.php

示例10: INT

            Database::get()->query("ALTER TABLE poll_question ADD q_scale INT(11) NULL DEFAULT NULL");
        }
        //Add course image field
        if (!DBHelper::fieldExists('course_image', 'course')) {
            Database::get()->query("ALTER TABLE course ADD course_image VARCHAR(400) NULL");
        }
        // Move course description from unit_resources to new course.description field
        if (!DBHelper::fieldExists('description', 'course')) {
            Database::get()->query("ALTER TABLE course ADD description MEDIUMTEXT NOT NULL");
            $result = Database::get()->query("UPDATE course, course_units, unit_resources\n                SET course.description = unit_resources.comments\n                WHERE course.id = course_units.course_id AND\n                      course_units.id = unit_resources.unit_id AND\n                      course_units.`order` = -1 AND\n                      unit_resources.res_id = -1");
            if ($result->affectedRows) {
                Database::get()->query("DELETE FROM unit_resources WHERE res_id = -1");
                Database::get()->query("DELETE FROM course_units WHERE `order` = -1");
            }
        }
        set_config('theme', 'default');
        set_config('theme_options_id', 0);
    }
    // update eclass version
    Database::get()->query("UPDATE config SET `value` = '" . ECLASS_VERSION . "' WHERE `key`='version'");
    updateInfo(1, $langUpgradeSuccess);
    $logdate = date("Y-m-d_G:i:s");
    $output_result = "<br/><div class='alert alert-success'>{$langUpgradeSuccess}<br/><b>{$langUpgReady}</b><br/><a href=\"../courses/log-{$logdate}.html\" target=\"_blank\">Log output</a></div><p/>";
    if ($debug_error) {
        $output_result .= "<div class='alert alert-danger'>" . $langUpgSucNotice . "</div>";
    }
    updateInfo(1, $output_result, false);
    $debug_output = "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/><title>Open eClass upgrade log of {$logdate}</title></head><body>{$debug_output}</body></html>";
    file_put_contents($webDir . "/courses/log-{$logdate}.html", $debug_output);
}
// end of if not submit
开发者ID:kostastzo,项目名称:openeclass,代码行数:31,代码来源:upgrade.php

示例11: unset

                }
                if (!empty($topic_info)) {
                    $mail = $mystep->getInstance("MyEmail", $topic_info['email'], $setting['gen']['charset']);
                    $mail->addEmail($topic_info['email'], $setting['web']['title'], "reply");
                    $mail->setFrom($topic_info['email'], $setting['web']['title'], true);
                    $mail->setSubject("RE: " . $_POST['subject']);
                    $mail->setContent($_POST['reply'], false);
                    $mail->addEmail($_POST['email']);
                    $flag = $mail->send($setting['email']);
                    unset($mail);
                    unset($_POST['sendmail']);
                }
            }
        }
        $db->update($setting['db']['pre'] . "ticket", $_POST, array("id", "n=", $id));
        updateInfo($idx);
        $goto_url = $setting['info']['self'] . "?method=list&idx=" . $idx;
        break;
    default:
        $goto_url = $setting['info']['self'];
}
function updateInfo($idx)
{
    global $ticket_list, $db, $setting;
    for ($i = 0, $m = count($ticket_list); $i < $m; $i++) {
        if ($ticket_list[$i]['idx'] == $idx) {
            $ticket_list[$i]['lastpost'] = $db->result($setting['db']['pre'] . "ticket", "max(add_date)", array("idx", "=", $idx));
            $ticket_list[$i]['total'] = $db->result($setting['db']['pre'] . "ticket", "count(*)", array("idx", "=", $idx));
            $ticket_list[$i]['untreated'] = $db->result($setting['db']['pre'] . "ticket", "count(*)", array(array("idx", "=", $idx), array("status", "n=", 0, "and")));
            $ticket_list[$i]['processing'] = $db->result($setting['db']['pre'] . "ticket", "count(*)", array(array("idx", "=", $idx), array("status", "n=", 1, "and")));
            $ticket_list[$i]['done'] = $db->result($setting['db']['pre'] . "ticket", "count(*)", array(array("idx", "=", $idx), array("status", "n=", 2, "and")));
开发者ID:laiello,项目名称:mystep-cms,代码行数:31,代码来源:ticket.php

示例12: mysql_real_escape_string

    $page = $_POST["page"];
    $title = $_POST["title"];
    $content = $_POST["content"];
    $menu = $_POST["menu"];
    $menuorder = (int) $_POST["menuorder"];
    $id = $_POST["id"];
    $template = $_POST["template"];
    $onder = $_POST["onder"];
    if ($onder == 'none') {
        $onder = 'NULL';
        $onder = mysql_real_escape_string($onder);
        $sql = "UPDATE pagecontent SET page='{$page}', title='{$title}', content='{$content}', menu='{$menu}', menuorder='{$menuorder}', template='{$template}', pagecontent_id=NULL WHERE id='{$id}'";
    } else {
        $sql = "UPDATE pagecontent SET page='{$page}', title='{$title}', content='{$content}', menu='{$menu}', menuorder='{$menuorder}', template='{$template}', pagecontent_id='{$onder}' WHERE id='{$id}'";
    }
    updateInfo($page, $title, $content, $menu, $menuorder, $template, $id, $onder, $sql);
    header("Location: index.php");
}
if (isset($_GET['id'])) {
    $id = $_GET['id'];
    $results = getInfo($id);
    $id = $results["id"];
    $page = $results["page"];
    $title = $results["title"];
    $content = $results["content"];
    $menu = $results["menu"];
    $menuorder = $results["menuorder"];
    $template = $results["template"];
    $db = new mysqli(SERVERNAME, USERNAME, PASSWORD, DBNAME);
    $sql2 = "SELECT id, menu FROM pagecontent WHERE pagecontent_id IS NULL";
    $menuitem = $db->query($sql2);
开发者ID:RickjdeJong,项目名称:Doomla,代码行数:31,代码来源:edit_logic.php

示例13: clearApacheLogs

/* String that represents number of current connections */
$Number_Of_Connections = "";
/* String that represents CPU usage percent */
$cpuUsageStr = "";
/* Result String to output */
$Outputed = "";
/* String that represents number of source addresses that are connected to host */
$Number_Of_Sources = 0;
clearApacheLogs();
// Clear logs at first
for (;;) {
    // Start reading info and output it
    updateInfo();
    printInfo();
    checkNetworkConnection();
    updateInfo();
    usleep($SLEEP_TIME);
    printInfo();
    usleep($SLEEP_TIME);
    checkNetworkConnection();
}
/* Clear Apache2 logs */
function clearApacheLogs()
{
    shell_exec("echo > /var/log/apache2/access.log");
}
/* Update information: cpu_usage, number_of_connections, sources */
/* Save new info as global values */
function updateInfo()
{
    global $MAX;
开发者ID:prashant-dhiru,项目名称:apache_monitor,代码行数:31,代码来源:monitor.php

示例14: db_connect

<?php

include_once '../include/headers.php';
include_once '../include/dbutils.php';
include_once '../include/main.php';
include_once 'domain/orders.php';
db_connect();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $request_payload = file_get_contents('php://input');
    //var_dump($request_payload);
    $json = json_decode($request_payload);
    if (isset($_GET['update'])) {
        $value = updateInfo($json);
    } else {
        if (isset($_GET['validate'])) {
            $value = validate($json);
        } else {
            if (isset($_GET['updateProductAmount'])) {
                $value = updateProductAmount($json);
            } else {
                $value = changeStatus($json);
            }
        }
    }
    //return JSON array
    exit(json_encode($value));
}
开发者ID:eznibe,项目名称:north-telas,代码行数:27,代码来源:orders_POST.php


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