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


PHP myUrl函数代码示例

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


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

示例1: _edit_score

function _edit_score($OID = 0, $CID = 0)
{
    loginRequireMgmt();
    if (!loginCheckPermission(USER::MGMT_TEAM)) {
        redirect("errors/401");
    }
    $item = "Team";
    $urlPrefix = "mgmt_team";
    $object = new Team();
    $object->retrieve($OID, $CID);
    if (!$object->exists()) {
        $data['body'][] = "<p>{$item} Not Found!</p>";
    } else {
        $fdata['form_heading'] = "Edit {$item} Score";
        $fdata['object'] = $object;
        $fdata['actionUrl'] = myUrl("{$urlPrefix}/ops_update_score");
        $fdata['actionLabel'] = "Submit";
        $fdata['cancelUrl'] = myUrl("{$urlPrefix}/manage");
        $fdata['cancelLabel'] = "Cancel";
        $form = View::do_fetch(VIEW_PATH . "{$urlPrefix}/score_form.php", $fdata);
        $data['head'][] = View::do_fetch(VIEW_PATH . "{$urlPrefix}/score_form_js.php");
        $data['body'][] = "<h2>Edit {$item} Score</h2>";
        $data['body'][] = $form;
    }
    View::do_dump(VIEW_PATH . 'layouts/mgmtlayout.php', $data);
}
开发者ID:brata-hsdc,项目名称:brata.masterserver,代码行数:26,代码来源:edit_score.php

示例2: _make_html_table

function _make_html_table($n, &$data)
{
    $dbh = getdbh();
    //pagination
    $stmt = $dbh->query('SELECT count(OID) total FROM t_user');
    $total = $stmt->fetchColumn();
    $limit = $GLOBALS['pagination']['per_page'];
    $data['body'][] = '<p>Showing records ' . ($n + 1) . ' to ' . min($total, $n + $limit) . ' of ' . $total . '</p>';
    $data['body'][] = pagination::makePagination($n, $total, myUrl('mgmt_user/manage'), $GLOBALS['pagination']);
    //table
    $stmt = $dbh->query("SELECT OID,CID,permissions,username,fullname FROM t_user LIMIT {$n},{$limit}");
    $tablearr[] = explode(',', 'username,roll,fullname');
    while ($rs = $stmt->fetch(PDO::FETCH_ASSOC)) {
        $OID = $rs['OID'];
        $CID = $rs['CID'];
        $row = null;
        $row['username'] = htmlspecialchars($rs['username']);
        $row['roll'] = htmlspecialchars(User::getPermissionsAsRollText($rs['permissions']));
        $row['fullname'] = htmlspecialchars($rs['fullname']);
        $row[] = '<a href="' . myUrl("mgmt_user/edit/{$OID}/{$CID}") . '">Edit</a> | <a href="javascript:jsconfirm(\'Really Delete User?\',\'' . myUrl("mgmt_user/ops_delete/{$OID}/{$CID}") . '\')">Delete</a>';
        $tablearr[] = $row;
    }
    $data['body'][] = table::makeTable($tablearr);
    $data['head'][] = '<script type="text/javascript" src="' . myUrl('js/jsconfirm.js') . '"></script>';
}
开发者ID:brata-hsdc,项目名称:brata.masterserver,代码行数:25,代码来源:manage.php

示例3: _make_user_table

function _make_user_table($n, &$data)
{
    $dbh = getdbh();
    //pagination
    $stmt = $dbh->query('SELECT count(*) "total" FROM "users"');
    $rs = $stmt->fetch(PDO::FETCH_ASSOC);
    $total = $rs['total'];
    $limit = $GLOBALS['pagination']['per_page'];
    $data['body'][] = '<p>Showing records ' . ($n + 1) . ' to ' . min($total, $n + $limit) . ' of ' . $total . '</p>';
    $data['body'][] = pagination::makePagination($n, $total, myUrl('users/manage'), $GLOBALS['pagination']);
    //table
    $stmt = $dbh->query("SELECT * FROM \"users\" LIMIT {$n},{$limit}");
    $tablearr[] = explode(',', 'uid,username,password,fullname,created_dt,Action');
    while ($rs = $stmt->fetch(PDO::FETCH_ASSOC)) {
        $uid = $rs['uid'];
        $row = null;
        foreach ($rs as $k => $v) {
            $row[$k] = htmlspecialchars($v);
        }
        $row[] = '<a href="' . myUrl("users/edit/{$uid}") . '">Edit</a> | <a href="javascript:jsconfirm(\'Really Delete User?\',\'' . myUrl("users/ops_delete/{$uid}") . '\')">Delete</a>';
        $tablearr[] = $row;
    }
    $data['body'][] = table::makeTable($tablearr);
    $data['head'][] = '<script type="text/javascript" src="' . myUrl('js/jsconfirm.js') . '"></script>';
}
开发者ID:469306621,项目名称:Languages,代码行数:25,代码来源:manage.php

示例4: _show

function _show($OID = 0, $CID = 0)
{
    loginRequireMgmt();
    if (!loginCheckPermission(USER::MGMT_HMB_DATA)) {
        redirect("errors/401");
    }
    $item = "HMB Data";
    $urlPrefix = "mgmt_hmb_data";
    $object = new HMBData();
    $object->retrieve($OID, $CID);
    if (!$object->exists()) {
        $data['body'][] = "<p>{$item} Not Found!</p>";
    } else {
        $fdata['form_heading'] = "Test {$item} -- Todo remove this";
        $fdata['object'] = $object;
        $fdata['actionUrl'] = myUrl("{$urlPrefix}/ops_update");
        $fdata['actionLabel'] = "Submit";
        $fdata['cancelUrl'] = myUrl("{$urlPrefix}/manage");
        $fdata['cancelLabel'] = "Back";
        $form = View::do_fetch(VIEW_PATH . "{$urlPrefix}/show.php", $fdata);
        //$data['head'][]=View::do_fetch(VIEW_PATH."$urlPrefix/form_js.php");
        $data['body'][] = "<h2>Show {$item}</h2>";
        $data['body'][] = $form;
    }
    View::do_dump(VIEW_PATH . 'layouts/mgmtlayout.php', $data);
}
开发者ID:brata-hsdc,项目名称:brata.masterserver,代码行数:26,代码来源:show.php

示例5: redirect

function redirect($url, $alertmsg = '')
{
    if ($alertmsg) {
        addjAlert($alertmsg, $url);
    }
    header('Location: ' . myUrl($url));
    exit;
}
开发者ID:brata-hsdc,项目名称:brata.masterserver,代码行数:8,代码来源:functions.php

示例6: _clear_scores

function _clear_scores()
{
    $fdata['actionUrl'] = myUrl('ops/clear_scores');
    $fdata['cancelUrl'] = myUrl('mgmt_main/index');
    $data['pagename'] = 'Clear Scores';
    $data['body'][] = '<h2>Warning Submitting this form will clear all scoring data the Database</h2><br/>';
    $data['body'][] = View::do_fetch(VIEW_PATH . 'mgmt_main/clear_scores_form.php', $fdata);
    View::do_dump(VIEW_PATH . 'layouts/mgmtlayout.php', $data);
}
开发者ID:brata-hsdc,项目名称:brata.masterserver,代码行数:9,代码来源:clear_scores.php

示例7: _resetdb

function _resetdb()
{
    $fdata['actionUrl'] = myUrl('ops/resetdb');
    $fdata['cancelUrl'] = myUrl('mgmt_main/index');
    $data['pagename'] = 'Reset Database';
    $data['body'][] = '<h2>Warning Submitting this form will reset the Database</h2><br/>';
    $data['body'][] = View::do_fetch(VIEW_PATH . 'mgmt_main/resetdb_form.php', $fdata);
    View::do_dump(VIEW_PATH . 'layouts/mgmtlayout.php', $data);
}
开发者ID:brata-hsdc,项目名称:brata.masterserver,代码行数:9,代码来源:resetdb.php

示例8: _loaddb

function _loaddb()
{
    $fdata['actionUrl'] = myUrl('mgmt_cpa_data/ops_loaddb');
    $fdata['cancelUrl'] = myUrl('mgmt_cpa_data/index');
    $data['pagename'] = 'Load Database';
    $data['body'][] = '<h2>Warning Submitting this form will replace all existing CPS data in the Database</h2><br/>';
    $data['body'][] = View::do_fetch(VIEW_PATH . 'mgmt_cpa_data/loaddb.php', $fdata);
    View::do_dump(VIEW_PATH . 'layouts/mgmtlayout.php', $data);
}
开发者ID:brata-hsdc,项目名称:brata.masterserver,代码行数:9,代码来源:loaddb.php

示例9: _resetdb

function _resetdb()
{
    $data['foot'][] = '<script type="text/javascript">
if (confirm("Really reset database?"))
  window.location="' . myUrl('ops/resetdb') . '";
else
  window.location="' . myUrl('main') . '";
</script>
';
    $data['body'][] = '<h2>Reset Database</h2>';
    $data['body'][] = '<p><strong>This will clear all existing user data and re-populate with some test data!</strong></p>';
    View::do_dump(VIEW_PATH . 'layouts/mainlayout.php', $data);
}
开发者ID:469306621,项目名称:Languages,代码行数:13,代码来源:resetdb.php

示例10: _manage

function _manage($n = 0)
{
    loginRequireMgmt();
    $n = (int) $n;
    $data['body'][] = '<h2>Web Site</h2><br />';
    if (loginCheckPermission(USER::MGMT_WEBSITE)) {
        $data['body'][] = '<a href="' . myUrl("mgmt_website/website") . '">Edit Web Site Settings</a>';
        $data['body'][] = '<br>';
        $data['body'][] = '<a href="' . myUrl("mgmt_website/sysconfig") . '">Edit System Configuration</a>';
        $data['body'][] = '<br>';
        $data['body'][] = '<a href="' . myUrl("mgmt_website/documents") . '">Upload Documents (term of use)</a>';
    } else {
        $data['body'][] = '<p>You do not have permission for this operation';
    }
    View::do_dump(VIEW_PATH . 'layouts/mgmtlayout.php', $data);
}
开发者ID:brata-hsdc,项目名称:brata.masterserver,代码行数:16,代码来源:manage.php

示例11: _documents

function _documents()
{
    loginRequireMgmt();
    $data['body'][] = '<h2>Documents</h2><br />';
    if (loginCheckPermission(USER::MGMT_WEBSITE)) {
        $fdata['form_heading'] = 'Manage Documents';
        $fdata['cancel'] = myUrl("mgmt_website/manage");
        $fdata['action'] = myUrl("mgmt_website/ops_documents_update");
        $form = View::do_fetch(VIEW_PATH . 'mgmt_website/documents_form.php', $fdata);
        //   	$data['head'][]=View::do_fetch(VIEW_PATH.'mgmt_website/documents_form_js.php');
        //    $data['head'][]='<script type="text/javascript" src="'.myUrl('js/isvalid.js').'"></script>';
        $data['body'][] = $form;
    } else {
        $data['body'][] = '<p>You do not have permission for this operation';
    }
    View::do_dump(VIEW_PATH . 'layouts/mgmtlayout.php', $data);
}
开发者ID:brata-hsdc,项目名称:brata.masterserver,代码行数:17,代码来源:documents.php

示例12: _index

function _index()
{
    $urlPrefix = "mock_rpi";
    $data['body'][] = '<h2>Mock rPI</h2><br />';
    $fdata['joinUrl'] = myUrl("{$urlPrefix}/sim_join");
    $fdata['joinLabel'] = "Join";
    $fdata['submitUrl'] = myUrl("{$urlPrefix}/sim_submit");
    $fdata['submitLabel'] = "Submit";
    //$fdata['timeExpiredUrl']=myUrl("$urlPrefix/sim_timeexpired");
    //$fdata['timeExpiredLabel']="Time Expired(HMB only)";
    $fdata['cancelUrl'] = myUrl("{$urlPrefix}/index");
    $fdata['cancelLabel'] = "Cancel";
    $form = View::do_fetch(VIEW_PATH . "{$urlPrefix}/mock_rpi.php", $fdata);
    //$data['head'][]=View::do_fetch(VIEW_PATH."$urlPrefix/form_js.php");
    $data['body'][] = $form;
    View::do_dump(VIEW_PATH . 'layouts/mgmtlayout.php', $data);
}
开发者ID:brata-hsdc,项目名称:brata.masterserver,代码行数:17,代码来源:index.php

示例13: _add

function _add()
{
    loginRequireMgmt();
    if (!loginCheckPermission(USER::MGMT_USER)) {
        redirect("errors/401");
    }
    $object = new User();
    $fdata['form_heading'] = 'Add User';
    $fdata['object'] = $object;
    $fdata['actionUrl'] = myUrl('mgmt_user/ops_update');
    $fdata['actionLabel'] = "Submit";
    $fdata['cancelUrl'] = myUrl('mgmt_user/manage');
    $fdata['cancelLabel'] = "Cancel";
    $form = View::do_fetch(VIEW_PATH . 'mgmt_user/form.php', $fdata);
    $data['head'][] = View::do_fetch(VIEW_PATH . 'mgmt_user/form_js.php');
    $data['body'][] = '<h2>Add New User</h2>';
    $data['body'][] = $form;
    View::do_dump(VIEW_PATH . 'layouts/mgmtlayout.php', $data);
}
开发者ID:brata-hsdc,项目名称:brata.masterserver,代码行数:19,代码来源:add.php

示例14: _make_html_table

function _make_html_table($n, &$data)
{
    $dbh = getdbh();
    //pagination
    $stmt = $dbh->query('SELECT count(OID) total FROM t_event');
    $total = $stmt->fetchColumn();
    $limit = $GLOBALS['pagination']['per_page'];
    $data['body'][] = '<p>Showing records ' . ($n + 1) . ' to ' . min($total, $n + $limit) . ' of ' . $total . '</p>';
    $data['body'][] = pagination::makePagination($n, $total, myUrl('mgmt_main/manage'), $GLOBALS['pagination']);
    //table
    $stmt = $dbh->query("SELECT created_dt,teamId,stationId,points,data FROM t_event LIMIT {$n},{$limit}");
    $tablearr[] = explode(',', 'created_dt,teamId,stationId,points,data');
    while ($rs = $stmt->fetch(PDO::FETCH_ASSOC)) {
        $row = null;
        foreach ($tablearr[0] as $f) {
            $row[] = htmlspecialchars($rs[$f]);
        }
        $tablearr[] = $row;
    }
    $data['body'][] = table::makeTable($tablearr);
    $data['body'][] = '<p><a href="' . myUrl("mgmt_main") . '">Back</a></p>';
    $data['head'][] = '<script type="text/javascript" src="' . myUrl('js/jsconfirm.js') . '"></script>';
}
开发者ID:brata-hsdc,项目名称:brata.masterserver,代码行数:23,代码来源:showevents.php

示例15: _edit

function _edit($OID = 0, $CID = 0)
{
    loginRequireMgmt();
    if (!loginCheckPermission(USER::MGMT_USER)) {
        redirect("errors/401");
    }
    $object = new User();
    $object->retrieve($OID, $CID);
    if (!$object->exists()) {
        $data['body'][] = '<p>User Not Found!</p>';
    } else {
        $fdata['form_heading'] = 'Edit User';
        $fdata['object'] = $object;
        $fdata['actionUrl'] = myUrl('mgmt_user/ops_update');
        $fdata['actionLabel'] = "Submit";
        $fdata['cancelUrl'] = myUrl('mgmt_user/manage');
        $fdata['cancelLabel'] = "Cancel";
        $form = View::do_fetch(VIEW_PATH . 'mgmt_user/form.php', $fdata);
        $data['head'][] = View::do_fetch(VIEW_PATH . 'mgmt_user/form_js.php');
        $data['body'][] = '<h2>Edit User</h2>';
        $data['body'][] = $form;
    }
    View::do_dump(VIEW_PATH . 'layouts/mgmtlayout.php', $data);
}
开发者ID:brata-hsdc,项目名称:brata.masterserver,代码行数:24,代码来源:edit.php


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