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


PHP getTypes函数代码示例

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


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

示例1: OnInput

 protected function OnInput()
 {
     parent::OnInput();
     $this->title = 'Добавление заявки';
     $this->types = getTypes();
     $this->departments = getDepartments();
     if (isset($_POST['submit'])) {
         move_uploaded_file($_FILES["filename"]['tmp_name'], $_SERVER['DOCUMENT_ROOT'] . "/dt/uploads/claim/" . $_FILES["filename"]["name"]);
         $file = $_FILES['filename']['name'];
         addClaim($_POST['in_num'], $_POST['in_date'], $_POST['out_num'], $_POST['out_date'], $_POST['type'], $_POST['description'], $_POST['sen_dep'], $_POST['sen_name'], $file, $_POST['rec']);
     }
 }
开发者ID:khaydarov,项目名称:zabota,代码行数:12,代码来源:C_AddClaim.php

示例2: confirmEditOrAddGroup

function confirmEditOrAddGroup($state)
{
    global $submitErr, $user;
    $data = processGroupInput(1);
    if ($submitErr) {
        editOrAddGroup($state);
        return;
    }
    $resourcetypes = getTypes("resources");
    $usergroups = getUserGroups();
    $affils = getAffiliations();
    $editname = getContinuationVar('editname', 1);
    if ($state) {
        if ($data["type"] == "user") {
            $title = "Add User Group";
            $question = "Add the following user group?";
            $target = "";
        } else {
            $title = "Add Resource Group";
            $question = "Add the following resource group?";
            $target = "#resources";
        }
        $nextmode = "submitAddGroup";
    } else {
        if ($data["type"] == "user") {
            $title = "Edit User Group";
            $question = "Submit changes to the user group?";
            $target = "";
        } else {
            $title = "Edit Resource Group";
            $question = "Submit changes to the resource group?";
            $target = "#resources";
        }
        $nextmode = "submitEditGroup";
    }
    print "<DIV align=center>\n";
    print "<H2>{$title}</H2>\n";
    print "{$question}<br><br>\n";
    if ($data['courseroll'] == 1 || $data['custom'] == 0 || $editname == 0) {
        if ($user['showallgroups']) {
            print "{$data['name']}@{$affils[$data['affiliationid']]}<br><br>\n";
        } else {
            print "{$data['name']}<br><br>\n";
        }
    }
    print "<TABLE>\n";
    if ($data["type"] == "resource") {
        print "  <TR>\n";
        print "    <TH align=right>Type:</TH>\n";
        print "    <TD>" . $resourcetypes["resources"][$data["resourcetypeid"]];
        print "</TD>\n";
        print "  </TR>\n";
    }
    if ($data['courseroll'] == 0 && $data['custom'] == 1 && $editname == 1) {
        print "  <TR>\n";
        print "    <TH align=right>Name:</TH>\n";
        if ($data['type'] == 'user' && ($user['showallgroups'] || $data['affiliationid'] != $user['affiliationid'])) {
            print "    <TD>{$data["name"]}@{$affils[$data['affiliationid']]}</TD>\n";
        } else {
            print "    <TD>{$data["name"]}</TD>\n";
        }
        print "  </TR>\n";
    }
    if ($data["type"] == "user") {
        if ($data['courseroll'] == 0 && $data['custom'] == 1) {
            print "  <TR>\n";
            print "    <TH align=right>Owner:</TH>\n";
            print "    <TD>" . $data["owner"] . "</TD>\n";
            print "  </TR>\n";
            print "  <TR>\n";
            print "    <TH align=right>Editable by:</TH>\n";
            if ($state == 0 && $data['editgroupid'] == 0) {
                $usergroups[0]['name'] = 'None';
            } elseif (!$user['showallgroups']) {
                $tmp = explode('@', $usergroups[$data["editgroupid"]]["name"]);
                if ($tmp[1] == $user['affiliation']) {
                    $usergroups[$data["editgroupid"]]["name"] = $tmp[0];
                }
            }
            print "    <TD>" . $usergroups[$data["editgroupid"]]["name"] . "</TD>\n";
            print "  </TR>\n";
        }
        $lengths = getReservationLengths(65535);
        print "  <TR>\n";
        print "    <TH align=right>Initial Max Time:</TH>\n";
        print "    <TD>{$lengths[$data["initialmax"]]}</TD>\n";
        print "  </TR>\n";
        print "  <TR>\n";
        print "    <TH align=right>Total Max Time:</TH>\n";
        print "    <TD>{$lengths[$data["totalmax"]]}</TD>\n";
        print "  </TR>\n";
        print "  <TR>\n";
        print "    <TH align=right>Max Extend Time:</TH>\n";
        print "    <TD>{$lengths[$data["maxextend"]]}</TD>\n";
        print "  </TR>\n";
        if (checkUserHasPerm('Set Overlapping Reservation Count')) {
            print "  <TR>\n";
            print "    <TH align=right>Max Overlapping Reservations:</TH>\n";
            print "    <TD>{$data["overlap"]}</TD>\n";
            print "  </TR>\n";
//.........这里部分代码省略.........
开发者ID:bq-xiao,项目名称:apache-vcl,代码行数:101,代码来源:groups.php

示例3: getResourceGroupMemberships

function getResourceGroupMemberships($type = "all")
{
    $return = array();
    if ($type == "all") {
        $types = getTypes("resources");
    } else {
        $types = array("resources" => array($type));
    }
    foreach ($types["resources"] as $type) {
        $return[$type] = array();
        $query = "SELECT r.subid AS id, " . "gm.resourcegroupid AS groupid " . "FROM resource r, " . "resourcegroupmembers gm, " . "resourcetype t " . "where t.name = '{$type}' AND " . "gm.resourceid = r.id AND " . "r.resourcetypeid = t.id";
        $qh = doQuery($query, 282);
        while ($row = mysql_fetch_assoc($qh)) {
            if (array_key_exists($row["id"], $return[$type])) {
                array_push($return[$type][$row["id"]], $row["groupid"]);
            } else {
                $return[$type][$row["id"]] = array($row["groupid"]);
            }
        }
    }
    return $return;
}
开发者ID:gw-acadtech,项目名称:VCL,代码行数:22,代码来源:utils.php

示例4: getTypes

        ?>
 ></input>
	</tr>
	<?php 
    }
    ?>
	


<!-----------------------TYPE----------------------------->
<tr>
	<th>Type:</th>
	<td>
		<select name='type'>
		<?php 
    getTypes($type);
    //call to the function that populates the drop down box
    ?>
		</select>
	</td>
</tr>
<!-----------------------START DATE-------------------------------->
<tr>
	<th>Start Date (Y-m-d):</th>
	
	
	<td><input type='text' id='startdate' name='startdate' size='10' value="<?php 
    echo date('Y-m-d');
    ?>
 ">
		</td>
开发者ID:byu-oit-ssengineering,项目名称:team-managment-tool,代码行数:31,代码来源:editMessage.php

示例5: getTypes

<form action="<?php 
echo $_SERVER['PHP_SELF'];
?>
" method="POST" name="trtRecherche" style="text-align:center; margin-bottom:40px;">
<table class='mh_tdborder' cellspacing="0" width="90%" align="center">
	<tr class='mh_tdpage'>
		<td width="33%">
			<table align="center">
				<tr><td>Id :</td><td><input type="text" name="id" style="width:100px" /></td></tr>
				<tr><td>Description :</td><td><input type="text" name="description" style="width:100px" /></td></tr>
				<tr>
					<td>Type :</td>
					<td><select name="type" style="width:100px">
							<option value="">Tous</option>
							<?php 
$types = getTypes();
foreach ($types as $option) {
    echo '<option value="' . $option . '">' . $option . '</option>';
}
?>
						</select>
					</td>
				</tr>

				<tr>
					<td>Grande tanière :</td>
					<td>
						<select name="taniere" style="width:100px">
							<option value="">Toutes</option>
							<?php 
$tanieres = getTanieres();
开发者ID:relaismago,项目名称:outils,代码行数:31,代码来源:recherche.php

示例6: updateHold

require_once 'objects.php';
require_once 'updateHold.php';
if (isset($_POST['contact_id'])) {
    $contact_id = $_POST['contact_id'];
    /* If ButtonAction is supplied, this is a page reset,
       which calls for data update.
       updateHold.php places changes in hold_xxx table
       for review before posting to live database. */
    if (isset($_POST['buttonAction'])) {
        updateHold($smarty, $msi, $user_id, $contact_id);
    }
    /* retrieve user's data */
    $user_data = new UserData($msi, $smarty, $user_id, $contact_id);
    $smarty->assign('user', $user_data);
    $contact_data = new ContactData($msi, $smarty, $user_id, $contact_id);
    $smarty->assign('contact', $contact_data);
    /* retrieve titles, degrees, address-, phone-,
       and e-mail types for drop-downs */
    getTypes($msi, $smarty);
    if (isset($_POST['referrer']) && $_POST['referrer'] == 'release') {
        /* Referred by release screen - display button to return. */
        $smarty->assign('referrer', 'release');
    } else {
        $smarty->assign('referrer', 'edit_contact');
    }
} else {
    $smarty->assign('footer', 'No contact specified');
}
$smarty->assign("localmenu", 1);
$smarty->assign("changeclasses", 1);
$smarty->display('edit_contact.tpl');
开发者ID:cottonwoodgulch,项目名称:alumni,代码行数:31,代码来源:edit_contact.php

示例7: AJsubmitAddUserGroupPriv

function AJsubmitAddUserGroupPriv()
{
    global $user;
    $node = processInputVar("activeNode", ARG_NUMERIC);
    if (!checkUserHasPriv("userGrant", $user["id"], $node)) {
        $text = "You do not have rights to add new user groups at this node.";
        print "addUserGroupPaneHide(); ";
        print "alert('{$text}');";
        dbDisconnect();
        exit;
    }
    $newgroupid = processInputVar("newgroupid", ARG_NUMERIC);
    # FIXME validate newgroupid
    $perms = explode(':', processInputVar('perms', ARG_STRING));
    $usertypes = getTypes("users");
    array_push($usertypes["users"], "block");
    array_push($usertypes["users"], "cascade");
    $newgroupprivs = array();
    foreach ($usertypes["users"] as $type) {
        if (in_array($type, $perms)) {
            array_push($newgroupprivs, $type);
        }
    }
    if (empty($newgroupprivs) || count($newgroupprivs) == 1 && in_array("cascade", $newgroupprivs)) {
        $text = "<font color=red>No user group privileges were specified</font>";
        print setAttribute('addUserGroupPrivStatus', 'innerHTML', $text);
        dbDisconnect();
        exit;
    }
    updateUserOrGroupPrivs($newgroupid, $node, $newgroupprivs, array(), "group");
    clearPrivCache();
    print "addUserGroupPaneHide(); ";
    print "refreshPerms(); ";
    dbDisconnect();
    exit;
}
开发者ID:gw-acadtech,项目名称:VCL,代码行数:36,代码来源:privileges.php

示例8: getTypeIdByAlias

function getTypeIdByAlias($type, $alias)
{
    $types = getTypes($type);
    foreach ($types as $t) {
        if ($t["alias"] == $alias) {
            return $t["id"];
        }
    }
    return 0;
}
开发者ID:bqx619,项目名称:ones_dev,代码行数:10,代码来源:common.php

示例9: listController

function listController()
{
    require_once MODELES . 'events/getEvents.php';
    $contents['types'] = getTypes();
    if (connected()) {
        $events = getEvents($_SESSION['id']);
    } else {
        $events = getEvents();
    }
    $events = detailsToStrings($events);
    // echo '<pre>';
    // var_dump($events);
    // echo '</pre>';
    $contents['searchResults'] = $events;
    // Préparation et appel de la vue :
    $title = 'Liste des évènements';
    $styles = ['search_v2.css', 'list-events.css', 'eventPreview.css', 'form.css'];
    $blocks = ['search'];
    $scripts = ['filter.js'];
    vue($blocks, $styles, $title, $contents, $scripts);
}
开发者ID:aurelienshz,项目名称:g1a,代码行数:21,代码来源:search.php

示例10: switch

use BitrixHelperLib\Classes\Block;
if ($this->StartResultCache(COMPONENTS_CACHE_TTL)) {
    try {
        switch ($this->GetTemplateName() == 'preview') {
            case 'preview':
                $arResult['SHOPS'] = Block\Getter::instance()->setFilter(array('IBLOCK_ID' => IBLOCK_SHOPS, 'ACTIVE' => 'Y'))->setPageSize(6)->setPageNum(1)->get();
                break;
            case 'list_menu':
                $arResult['SHOPS'] = Block\Getter::instance()->setFilter(array('IBLOCK_ID' => IBLOCK_SHOPS, 'ACTIVE' => 'Y'))->setOrder(array('DATE_ACTIVE_FROM' => 'DESC'))->get();
                break;
            case 'category_filter_menu':
                $arResult['SHOPS'] = Block\Getter::instance()->setFilter(array('IBLOCK_ID' => IBLOCK_SHOPS, 'ACTIVE' => 'Y'))->setOrder(array('DATE_ACTIVE_FROM' => 'DESC'))->get();
                if (!empty($arParams['TAG'])) {
                    $arResult['TAG'] = $arParams['TAG'];
                }
                break;
            default:
                $arResult['SHOPS'] = Block\Getter::instance()->setFilter(array('IBLOCK_ID' => IBLOCK_SHOPS, 'ACTIVE' => 'Y'))->get();
                break;
        }
        $arResult['TYPES'] = getTypes($arResult['SHOPS']);
        if (empty($arResult['SHOPS'])) {
            throw new Exception('SHOPS');
        }
    } catch (Exception $e) {
        $this->AbortResultCache();
        //define('ERROR_404', true);
        //echo $e->getMessage();
    }
    $this->IncludeComponentTemplate();
}
开发者ID:AlexSmerw,项目名称:domino,代码行数:31,代码来源:component.php

示例11: handleUrlManager

function handleUrlManager($key, $urlManager)
{
    global $unsupportedToken, $dryRun;
    $clazz = find("class", $urlManager);
    if (!in_array($clazz, array("kAkamaiUrlManager", "kUrlManager"))) {
        print "*** Error: Can't transform {$key}\n";
        return;
    }
    print "Transforming Url Manager : {$key}\n";
    $types = getTypes($urlManager);
    foreach ($types as $type) {
        $delivery = createDelivery($key, $type, $urlManager);
        print "\t Saving delivery profile {$key} : {$type['0']}\n";
        if (!$dryRun) {
            $delivery->save();
        }
    }
    $missingParams = array_diff_key($urlManager, array_flip($unsupportedToken));
    if (count($missingParams)) {
        print "Error: Not all parameters were handled. Url : {$key} \n";
        print_r(array_keys($missingParams));
        die;
    }
    $missingToken = array_intersect_key($urlManager, array_flip($unsupportedToken));
    if (count($missingToken)) {
        print "Warning: Tokenizer / Recognizer parameters were ignore. Please add them manually : " . implode(", ", array_keys($missingToken)) . "\n";
    }
    print "<--\n";
}
开发者ID:DBezemer,项目名称:server,代码行数:29,代码来源:translateUrlManagersToDeliveryProfiles.php

示例12: getTypes

<?php

/* EVENTS -> CREATE */
require MODELES . 'events/insertEvent.php';
require MODELES . 'functions/date.php';
require MODELES . 'functions/google.php';
require MODELES . 'functions/form.php';
require_once MODELES . 'events/getTypes.php';
$contents['types'] = getTypes();
/**** Préparation de la vue ****/
$title = 'Créer event';
$styles = ['create.css', 'form.css', 'search.css', 'prettyform.css'];
$blocks = ['create'];
$scripts = ['googleAutocompleteAddress.js', 'autohosted.js'];
$contents['values'] = ['type' => -1];
// Initialisation pour affiher "choisissez un type" mais quand même garder en mémoire le type choisi
if (connected()) {
    if (empty($_POST)) {
        vue($blocks, $styles, $title, $contents, $scripts);
    } else {
        // le formulaire a été validé
        // Recherche d'erreurs lors du remplissage du formulaire :
        // Initialisation de la liste des erreurs :
        $errors = [];
        foreach ($_POST as $key => $value) {
            $_POST[$key] = htmlspecialchars($_POST[$key]);
            $contents['values'][$key] = htmlspecialchars($_POST[$key]);
        }
        // On vérifie que tous les champs requis sont bien remplis :
        $requiredFields = ['titre', 'type', 'date_debut', 'date_fin', 'place', 'beginning', 'visibility', 'invitation'];
        // $requiredFields = ['titre'];
开发者ID:aurelienshz,项目名称:g1a,代码行数:31,代码来源:create.php

示例13: getTypes

?>
"><?php 
echo $website;
?>
</a></label>
		</div>
	</div>
	<div style="clear: right;"></div><div style="clear: left;"></div>
	<div class="form_row" style="margin-top:20px;">
		<div class="form_tdlabel" style="width:80px;color:gray;">
			<label>Type :</label>
		</div>
		<div class="form_tdinput" style="color:black;text-align:left;float:left;margin-left:10px;">
			<label>
			<?php 
$t = getTypes();
foreach ($t as $k => $v) {
    if ("'" . $id_type . "'" == $k) {
        echo $v;
    }
}
?>
			</label>
		</div>
	</div>
	<div style="clear: right;"></div><div style="clear: left;"></div>
	<div class="form_row" style="padding-bottom:0px;overflow:auto;">
		<div class="form_tdlabel" style="text-align:left;width:200px;border:0px dashed gray;height:76px;padding:4px;">
			<?php 
echo $description;
?>
开发者ID:BGCX067,项目名称:ezetestproj-svn-to-git,代码行数:31,代码来源:business_detailMike.php

示例14: _XMLRPCchangeResourceGroupPriv_sub

function _XMLRPCchangeResourceGroupPriv_sub($mode, $name, $type, $nodeid, $permissions)
{
    require_once ".ht-inc/privileges.php";
    global $user;
    if (!is_numeric($nodeid)) {
        return array('status' => 'error', 'errorcode' => 78, 'errormsg' => 'Invalid nodeid specified');
    }
    if (!checkUserHasPriv("resourceGrant", $user['id'], $nodeid)) {
        return array('status' => 'error', 'errorcode' => 61, 'errormsg' => 'Unable to remove resource group privileges on this node');
    }
    $resourcetypes = getTypes('resources');
    if (!in_array($type, $resourcetypes['resources'])) {
        return array('status' => 'error', 'errorcode' => 71, 'errormsg' => 'Invalid resource type');
    }
    $groupid = getResourceGroupID("{$type}/{$name}");
    if (is_null($groupid)) {
        return array('status' => 'error', 'errorcode' => 74, 'errormsg' => 'resource group does not exist');
    }
    $changeperms = explode(':', $permissions);
    $allperms = getResourcePrivs();
    $diff = array_diff($changeperms, $allperms);
    if (count($diff)) {
        return array('status' => 'error', 'errorcode' => 66, 'errormsg' => 'Invalid or missing permissions list supplied');
    }
    $nocheckperms = array('block', 'cascade', 'available');
    $checkperms = array_diff($changeperms, $nocheckperms);
    $groupdata = getResourceGroups($type, $groupid);
    if (count($checkperms) && !array_key_exists($groupdata[$groupid]["ownerid"], $user["groups"])) {
        return array('status' => 'error', 'errorcode' => 79, 'errormsg' => 'Unable to modify privilege set for resource group');
    }
    $key = "{$type}/{$name}/{$groupid}";
    $cnp = getNodeCascadePrivileges($nodeid, "resources");
    $np = getNodePrivileges($nodeid, 'resources');
    if (array_key_exists($key, $cnp['resources']) && (!array_key_exists($key, $np['resources']) || !in_array('block', $np['resources'][$key]))) {
        $intersect = array_intersect($cnp['resources'][$key], $changeperms);
        if (count($intersect)) {
            return array('status' => 'error', 'errorcode' => 80, 'errormsg' => 'Unable to modify privileges cascaded to this node');
        }
    }
    if ($mode == 'remove') {
        $diff = array_diff($np['resources'][$key], $changeperms);
        if (count($diff) == 1 && in_array("cascade", $diff)) {
            $changeperms[] = 'cascade';
        }
    }
    if ($mode == 'add') {
        updateResourcePrivs("{$groupid}", $nodeid, $changeperms, array());
    } elseif ($mode == 'remove') {
        updateResourcePrivs("{$groupid}", $nodeid, array(), $changeperms);
    }
    return array('status' => 'success');
}
开发者ID:bq-xiao,项目名称:apache-vcl,代码行数:52,代码来源:xmlrpcWrappers.php

示例15: array

    $stmt->bind_result($id, $title, $type_id, $type_title);
    $results = array();
    $i = 0;
    while ($stmt->fetch()) {
        $results[$i]['id'] = $id;
        $results[$i]['title'] = $title;
        $results[$i]['type_id'] = $type_id;
        $results[$i]['type_title'] = $type_title;
        $i++;
    }
    $stmt->close();
    $mysqli->close();
    return $results;
}
$tiles = getTile($tile_id, $DB_SERVER, $DB_USERNAME, $DB_PASSWORD, $DB_DATABASE);
$types = getTypes($DB_SERVER, $DB_USERNAME, $DB_PASSWORD, $DB_DATABASE);
$categories = getCategories($DB_SERVER, $DB_USERNAME, $DB_PASSWORD, $DB_DATABASE);
$typesCount = count($types);
$categoriesCount = count($categories);
?>
<html>
<head>
    <title>Edit Tile</title>
    <?php 
include 'includes/head.php';
?>
</head>
<body>
<?php 
foreach ($tiles as $tile) {
    $lat = $tile['lat'];
开发者ID:Steadroy,项目名称:hcf-btw,代码行数:31,代码来源:tile-edit.php


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