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


PHP draw函数代码示例

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


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

示例1: traverse

function traverse($node)
{
    draw($node);
    foreach ($node->children as $child) {
        traverse($child);
    }
}
开发者ID:fulldump,项目名称:8,代码行数:7,代码来源:sitemap.php

示例2: delete_ngi

function delete_ngi()
{
    checkUserIsAdmin();
    if ($_POST) {
        submit();
    } else {
        draw();
    }
}
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:9,代码来源:delete_ngi.php

示例3: edit_dn

/**
 * Controller for an edit user_dn request
 * @global array $_POST only set if the browser has POSTed data
 * @return null
 */
function edit_dn()
{
    //The following line will be needed if this controller is ever used for non administrators:
    //checkPortalIsNotReadOnlyOrUserIsAdmin($user);
    if ($_POST) {
        // If we receive a POST request it's to edit a user dn
        submit();
    } else {
        // If there is no post data, draw the edit DN page
        draw();
    }
}
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:17,代码来源:edit_user_dn.php

示例4: create_document

function create_document($topic_dists, $theta, $length)
{
    $doc = array_fill_keys(range(0, 24), 0);
    while ($length-- > 0) {
        $topic = draw($theta);
        $word = draw($topic_dists[$topic]);
        $doc[$word] += 1;
    }
    return array_map(function ($start) use($doc) {
        return array_slice($doc, $start, 5);
    }, range(0, 24, 5));
}
开发者ID:Tjorriemorrie,项目名称:app,代码行数:12,代码来源:create_dataset.php

示例5: edit_property

/**
 * Controller for an edit site property request
 * @global array $_POST only set if the browser has POSTed data
 * @return null
 */
function edit_property()
{
    $dn = Get_User_Principle();
    $user = \Factory::getUserService()->getUserByPrinciple($dn);
    //Check the portal is not in read only mode, returns exception if it is and user is not an admin
    checkPortalIsNotReadOnlyOrUserIsAdmin($user);
    if ($_POST) {
        submit($user);
    } else {
        draw($user);
    }
}
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:17,代码来源:edit_service_group_property.php

示例6: add_type

/**
 * Controller for an add service type request
 * @global array $_POST only set if the browser has POSTed data
 * @return null
 */
function add_type()
{
    //The following line will be needed if this controller is ever used for non administrators:
    //checkPortalIsNotReadOnlyOrUserIsAdmin($user);
    if ($_POST) {
        // If we receive a POST request it's to add a service type
        submit();
    } else {
        // If there is no post data, draw the add service type form
        draw();
    }
}
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:17,代码来源:add_service_type.php

示例7: retrieve

/**
 * Controller for a retrieve account request.
 * @global array $_POST only set if the browser has POSTed data
 * @return null
 */
function retrieve()
{
    //Check the portal is not in read only mode, returns exception if it is
    checkPortalIsNotReadOnly();
    if ($_POST) {
        // If we receive a POST request it's to update a user
        submit();
    } else {
        // If there is no post data, draw the edit user form
        draw();
    }
}
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:17,代码来源:retrieve_account.php

示例8: edit_service

/**
 * Controller for an edit service request
 * @global array $_POST only set if the browser has POSTed data
 * @return null
 */
function edit_service()
{
    $dn = Get_User_Principle();
    $user = \Factory::getUserService()->getUserByPrinciple($dn);
    //Check the portal is not in read only mode, returns exception if it is and user is not an admin
    checkPortalIsNotReadOnlyOrUserIsAdmin($user);
    if ($_POST) {
        // If we receive a POST request it's for a new site
        submit($user);
    } else {
        // If there is no post data, draw the edit site form
        draw($user);
    }
}
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:19,代码来源:edit_service.php

示例9: delete

function delete()
{
    if (!isset($_REQUEST['id']) || !is_numeric($_REQUEST['id'])) {
        throw new Exception("An id must be specified");
    }
    $dn = Get_User_Principle();
    $user = \Factory::getUserService()->getUserByPrinciple($dn);
    //get the site
    $site = \Factory::getSiteService()->getSite($_REQUEST['id']);
    if ($_POST or sizeof($site->getServices()) == 0) {
        submit($site, $user);
    } else {
        draw($site);
    }
}
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:15,代码来源:delete_site.php

示例10: add_service_group_property

/**
 * Controller for a new_property request
 * @global array $_POST only set if the browser has POSTed data
 * @return null
 */
function add_service_group_property()
{
    $dn = Get_User_Principle();
    $user = \Factory::getUserService()->getUserByPrinciple($dn);
    //Check the portal is not in read only mode, returns exception if it is and user is not an admin
    checkPortalIsNotReadOnlyOrUserIsAdmin($user);
    //Check user has modification rights for this entity
    if ($_POST) {
        // If we receive a POST request it's for a new property
        submit($user);
    } else {
        // If there is no post data, draw the New property form
        draw($user);
    }
}
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:20,代码来源:add_service_group_property.php

示例11: delete

function delete()
{
    $dn = Get_User_Principle();
    $user = \Factory::getUserService()->getUserByPrinciple($dn);
    //get the site
    if (isset($_REQUEST['propertyid']) || !is_numeric($_REQUEST['propertyid'])) {
        $property = \Factory::getServiceGroupService()->getProperty($_REQUEST['propertyid']);
        $serviceGroup = \Factory::getServiceGroupService()->getServiceGroup($_REQUEST['id']);
    } else {
        throw new \Exception("A service group must be specified");
    }
    if ($_POST) {
        submit($property, $user, $serviceGroup);
    } else {
        draw($property, $serviceGroup, $user);
    }
}
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:17,代码来源:delete_service_group_property.php

示例12: add_ngis_to_project

/**
 * Controller for a request to add NGIs to a project
 * @global array $_POST only set if the browser has POSTed data
 * @return null
 */
function add_ngis_to_project()
{
    $dn = Get_User_Principle();
    $user = \Factory::getUserService()->getUserByPrinciple($dn);
    //Check the portal is not in read only mode, returns exception if it is and user is not an admin
    checkPortalIsNotReadOnlyOrUserIsAdmin($user);
    ////Check the user has permission to see the page, will throw exception
    //if correct permissions are lacking
    checkUserIsAdmin();
    if ($_POST) {
        // If we receive a POST request it's to add ngis
        submit();
    } else {
        // If there is no post data, draw the add NGI page
        draw();
    }
}
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:22,代码来源:add_ngis.php

示例13: delete

function delete()
{
    $dn = Get_User_Principle();
    $user = \Factory::getUserService()->getUserByPrinciple($dn);
    if (!isset($_REQUEST['propertyid']) || !is_numeric($_REQUEST['propertyid'])) {
        throw new Exception("A propertyid must be specified");
    }
    if (!isset($_REQUEST['serviceid']) || !is_numeric($_REQUEST['serviceid'])) {
        throw new Exception("A service id must be specified");
    }
    //get the service and property
    $property = \Factory::getServiceService()->getProperty($_REQUEST['propertyid']);
    $service = \Factory::getServiceService()->getService($_REQUEST['serviceid']);
    if ($_POST) {
        submit($property, $service, $user);
    } else {
        draw($property, $service, $user);
    }
}
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:19,代码来源:delete_service_property.php

示例14: delete_endpoint

function delete_endpoint()
{
    $dn = Get_User_Principle();
    $user = \Factory::getUserService()->getUserByPrinciple($dn);
    if (!isset($_REQUEST['endpointid']) || !is_numeric($_REQUEST['endpointid'])) {
        throw new Exception("An endpointid must be specified");
    }
    if (!isset($_REQUEST['serviceid']) || !is_numeric($_REQUEST['serviceid'])) {
        throw new Exception("A service id must be specified");
    }
    //get the service and endpoint
    $endpoint = \Factory::getServiceService()->getEndpoint($_REQUEST['endpointid']);
    $service = \Factory::getServiceService()->getService($_REQUEST['serviceid']);
    if ($_POST) {
        submit($endpoint, $service, $user);
    } else {
        draw($endpoint, $service, $user);
    }
}
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:19,代码来源:delete_service_endpoint.php

示例15: drawInterface

function drawInterface($dbname, $out, $struct, $databases)
{
    echo "<html><head><title>sGrep</title></head><body>";
    echo "<style>a:link, a:hover, a:active, a:visited{color:black;text-decoration: none;}</style>";
    echo "<div class='bar'>";
    echo "<span><b>Databases</b>: </span>";
    foreach ($databases as $database) {
        echo " <span><a href='?dbname={$database}' style='color:blue;'>{$database}</a></span> | ";
    }
    echo "</div>";
    echo "<h1>Graf</h1>";
    echo "<div class='draw' >";
    draw($out);
    echo "</div>";
    echo "<div class='structure' >";
    echo "<h1>Short structure</h1>";
    echo "<table class='short_structure' >";
    foreach ($struct as $tablename => $column) {
        echo "<tr id='table_structure_short_" . $tablename . "' colspan='2' style='background-color:red;'><td><b>" . $tablename . "</b><span style='color:grey'>(" . count($column) . ")</span></td></tr>";
        foreach ($column as $columnname => $columnvalues) {
            echo "<tr colspan='2'><td><a href='#table_structure_column_" . $tablename . "_" . $columnname . "'>" . $columnname . "</a></td></tr>";
        }
    }
    echo "</table>";
    echo "<h1>Long structure</h1>";
    echo "<table class='long_structure' >";
    foreach ($struct as $tablename => $column) {
        echo "<tr colspan='2' style='background-color:red;'><td><b>" . $tablename . "</b></td></tr>";
        foreach ($column as $columnname => $columnvalues) {
            echo "<tr id='table_structure_column_" . $tablename . "_" . $columnname . "' colspan='2'><td style='background-color:green;'><b><i>" . $columnname . "</i></b></td></tr>";
            foreach ($columnvalues as $columnvaluename => $columnvalue) {
                echo "<tr>";
                echo "<td>" . $columnvaluename . "</td>";
                echo "<td>" . $columnvalue . "</td>";
                echo "</tr>";
            }
        }
    }
    echo "</table>";
    echo "</div>";
    echo "</body></html>";
}
开发者ID:pekand,项目名称:grep,代码行数:42,代码来源:draw.php


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