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


PHP do_edit函数代码示例

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


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

示例1: do_new

function do_new($formatter, $options)
{
    global $DBInfo;
    if (!$options['value']) {
        $title = _("Create a new page");
        $formatter->send_header("", $options);
        $formatter->send_title($title, "", $options);
        $url = $formatter->link_url($formatter->page->urlname);
        if ($DBInfo->hasPage('MyNewPage')) {
            $p = $DBInfo->getPage('MyNewPage');
            $f = new Formatter($p, $options);
            $f->use_rating = 0;
            $f->send_page('', $options);
        }
        $msg = _("Page Name");
        $fixname = _("Normalize this page name");
        $btn = _("Create a new page");
        print <<<FORM
<div class='addPage'>
<form method='get' action='{$url}'>
<table style='border:0'><tr><th class='addLabel'><labe>{$msg}: </label></th><td><input type='hidden' name='action' value='new' />
    <input name='value' size='30' /></td></tr>
<tr><th class='addLabel'><input type='checkbox' name='fixname' checked='checked' /></th><td>{$fixname}</td></tr>
<td></td><td><input type='submit' value='{$btn}' /></td>
</tr></table>
    </form>
</div>
FORM;
        $formatter->send_footer();
    } else {
        $pgname = $options['value'];
        if ($options['fixname']) {
            $pgname = normalize($pgname);
        }
        $options['page'] = $pgname;
        $page = new WikiPage($pgname);
        $f = new Formatter($page, $options);
        do_edit($f, $options);
        return true;
    }
}
开发者ID:ahastudio,项目名称:moniwiki,代码行数:41,代码来源:new.php

示例2: do_create

function do_create()
{
    global $create_id;
    do_edit($create_id);
}
开发者ID:h16o2u9u,项目名称:rtoss,代码行数:5,代码来源:tropy.php

示例3:

global $current_section;
$current_section = 'campaigns';
require_once '../../init.php';
// Required files
require_once MAD_PATH . '/www/cp/auth.php';
require_once MAD_PATH . '/functions/adminredirect.php';
require_once MAD_PATH . '/www/cp/restricted.php';
require_once MAD_PATH . '/www/cp/admin_functions.php';
if (!check_permission('campaigns', $user_detail['user_id'])) {
    exit;
}
global $current_action;
$current_action = 'edit';
$_GET['id'] = (int) $_GET['id'];
if (isset($_POST['update'])) {
    if (do_edit('adunit', $_POST, $_GET['id'])) {
        global $edited;
        $edited = 1;
        MAD_Admin_Redirect::redirect('edit_ad_unit.php?edited=1&id=' . $_GET['id'] . '');
    } else {
        global $edited;
        $edited = 2;
    }
}
if ($edited != 2) {
    $editdata = get_adunit_detail($_GET['id']);
    $editdata['creative_type'] = $editdata['adv_type'];
    $editdata['custom_creative_width'] = $editdata['adv_width'];
    $editdata['custom_creative_height'] = $editdata['adv_height'];
    $editdata['click_url'] = $editdata['adv_click_url'];
    $editdata['tracking_pixel'] = $editdata['adv_impression_tracking_url'];
开发者ID:aiurlano,项目名称:mAdserve-Fork,代码行数:31,代码来源:edit_ad_unit.php

示例4:

global $edited;
$current_section = 'campaigns';
require_once '../../init.php';
// Required files
require_once MAD_PATH . '/www/cp/auth.php';
require_once MAD_PATH . '/functions/adminredirect.php';
require_once MAD_PATH . '/www/cp/restricted.php';
require_once MAD_PATH . '/www/cp/admin_functions.php';
if (!check_permission('inventory', $user_detail['user_id'])) {
    exit;
}
global $current_action;
$current_action = 'edit';
$_GET['id'] = (int) $_GET['id'];
if (isset($_POST['update'])) {
    if (do_edit('campaign', $_POST, $_GET['id'])) {
        $edited = 1;
        MAD_Admin_Redirect::redirect('edit_campaign.php?edited=1&id=' . $_GET['id'] . '');
    } else {
        global $edited;
        $edited = 2;
    }
}
if ($edited != 2) {
    $editdata = get_campaign_detail($_GET['id']);
    $editdata['geo_targeting'] = $editdata['country_target'];
    $editdata['device_targeting'] = $editdata['device_target'];
    $editdata['channel_targeting'] = $editdata['channel_target'];
    $editdata['publication_targeting'] = $editdata['publication_target'];
    $main_cap = get_campaign_cap_detail($_GET['id']);
    $editdata['total_amount'] = $main_cap['total_amount'];
开发者ID:aiurlano,项目名称:mAdserve-Fork,代码行数:31,代码来源:edit_campaign.php

示例5: array_push

array_push($globals['cache-control'], 'no-cache');
do_header(_("editar noticia"), "post");
echo '<div id="singlewrap">' . "\n";
if (!empty($_REQUEST['id']) && is_numeric($_REQUEST['id'])) {
    $link = new Link();
    $link->id = $link_id = intval($_REQUEST['id']);
    $link->read();
    if (!$link->is_editable() || intval($_GET['user'] != $current_user->user_id)) {
        echo '<div class="form-error-submit">&nbsp;&nbsp;' . _("noticia no modificable") . '</div>' . "\n";
        return;
    }
    if ($_POST['phase'] == "1") {
        do_save($link);
        fork("backend/send_pingbacks.php?id={$link->id}");
    } else {
        do_edit($link);
    }
} else {
    echo '<div class="form-error-submit">&nbsp;&nbsp;' . _("¿duh?") . '</div>';
}
echo "</div>" . "\n";
do_footer();
function do_edit($link)
{
    global $dblang, $db, $current_user, $globals;
    $link->status = $link->sub_status;
    $link->discarded = $link->is_discarded();
    $link->status_text = $link->get_status_text();
    $link->key = md5($globals['now'] . $link->randkey);
    $link->chars_left = 550 - mb_strlen(html_entity_decode($link->content, ENT_COMPAT, 'UTF-8'), 'UTF-8');
    $link->thumb_url = $link->has_thumb();
开发者ID:manelio,项目名称:woolr,代码行数:31,代码来源:editlink.php

示例6:

global $current_section;
$current_section = 'configuration';
require_once '../../init.php';
// Required files
require_once MAD_PATH . '/www/cp/auth.php';
require_once MAD_PATH . '/functions/adminredirect.php';
require_once MAD_PATH . '/www/cp/restricted.php';
require_once MAD_PATH . '/www/cp/admin_functions.php';
if (!check_permission('configuration', $user_detail['user_id']) && !check_permission_simple('modify_advertisers', $user_detail['user_id'])) {
    exit;
}
global $current_action;
$current_action = 'edit';
if (isset($_POST['update'])) {
    if (do_edit('user', $_POST, $_GET['id'])) {
        global $edited;
        $edited = 1;
        MAD_Admin_Redirect::redirect('edit_user.php?edited=1&id=' . $_GET['id'] . '');
    } else {
        global $edited;
        $edited = 2;
    }
}
if ($edited != 2) {
    $editdata = get_user_detail($_GET['id']);
}
require_once MAD_PATH . '/www/cp/templates/header.tpl.php';
?>

<div id="content">		
开发者ID:liulingfu,项目名称:madserve,代码行数:30,代码来源:edit_user.php

示例7:

global $current_section;
global $edited;
$current_section = 'campaigns';
require_once '../../init.php';
// Required files
require_once MAD_PATH . '/www/cp/auth.php';
require_once MAD_PATH . '/functions/adminredirect.php';
require_once MAD_PATH . '/www/cp/restricted.php';
require_once MAD_PATH . '/www/cp/admin_functions.php';
if (!check_permission('inventory', $user_detail['user_id'])) {
    exit;
}
global $current_action;
$current_action = 'edit';
if (isset($_POST['update'])) {
    if (do_edit('runninglimit', $_POST, $_GET['id'])) {
        $edited = 1;
        MAD_Admin_Redirect::redirect('edit_running_limit.php?edited=1&id=' . $_GET['id'] . '');
    } else {
        global $edited;
        $edited = 2;
    }
}
require_once MAD_PATH . '/www/cp/templates/header.tpl.php';
?>


    <div id="content">

        <div id="contentHeader">
            <h1>Edit Running Campaign Limit</h1>
开发者ID:aiurlano,项目名称:mAdserve-Fork,代码行数:31,代码来源:edit_running_limit.php

示例8:

global $current_section;
$current_section = 'configuration';
require_once '../../init.php';
// Required files
require_once MAD_PATH . '/www/cp/auth.php';
require_once MAD_PATH . '/functions/adminredirect.php';
require_once MAD_PATH . '/www/cp/restricted.php';
require_once MAD_PATH . '/www/cp/admin_functions.php';
if (!check_permission('configuration', $user_detail['user_id'])) {
    exit;
}
global $current_action;
$current_action = 'edit';
if (isset($_POST['update'])) {
    if (do_edit('channel', $_POST, $_GET['id'])) {
        global $edited;
        $edited = 1;
        MAD_Admin_Redirect::redirect('edit_channel.php?edited=1&id=' . $_GET['id'] . '');
    } else {
        global $edited;
        $edited = 2;
    }
}
if ($edited != 2) {
    $editdata = get_channel_detail($_GET['id']);
}
require_once MAD_PATH . '/www/cp/templates/header.tpl.php';
?>

<div id="content">		
开发者ID:liulingfu,项目名称:madserve,代码行数:30,代码来源:edit_channel.php

示例9:

global $current_section;
$current_section = 'configuration';
require_once '../../init.php';
// Required files
require_once MAD_PATH . '/www/cp/auth.php';
require_once MAD_PATH . '/functions/adminredirect.php';
require_once MAD_PATH . '/www/cp/restricted.php';
require_once MAD_PATH . '/www/cp/admin_functions.php';
if (!check_permission('configuration', $user_detail['user_id'])) {
    exit;
}
global $current_action;
$current_action = 'edit';
if (isset($_POST['update'])) {
    if (do_edit('group', $_POST, $_GET['id'])) {
        global $edited;
        $edited = 1;
        MAD_Admin_Redirect::redirect('edit_group.php?edited=1&id=' . $_GET['id'] . '');
    } else {
        global $edited;
        $edited = 2;
    }
}
if ($edited != 2) {
    $editdata = get_group_detail($_GET['id']);
}
require_once MAD_PATH . '/www/cp/templates/header.tpl.php';
?>

<div id="content">		
开发者ID:liulingfu,项目名称:madserve,代码行数:30,代码来源:edit_group.php

示例10:

require_once '../../init.php';
// Required files
require_once MAD_PATH . '/www/cp/auth.php';
require_once MAD_PATH . '/functions/adminredirect.php';
require_once MAD_PATH . '/www/cp/restricted.php';
require_once MAD_PATH . '/www/cp/admin_functions.php';
if (!check_permission('inventory', $user_detail['user_id'])) {
    exit;
}
if (!check_permission_simple('modify_publications', $user_detail['user_id'])) {
    exit;
}
global $current_action;
$current_action = 'edit';
if (isset($_POST['update'])) {
    if (do_edit('placement', $_POST, $_GET['id'])) {
        $edited = 1;
        MAD_Admin_Redirect::redirect('edit_zone.php?edited=1&id=' . $_GET['id'] . '');
    } else {
        $edited = 2;
    }
}
if ($edited != 2) {
    $editdata = get_zone_detail($_GET['id']);
}
require_once MAD_PATH . '/www/cp/templates/header.tpl.php';
?>

<div id="content">		
		
		<div id="contentHeader">
开发者ID:liulingfu,项目名称:madserve,代码行数:31,代码来源:edit_zone.php

示例11:

require_once '../../init.php';
// Required files
require_once MAD_PATH . '/www/cp/auth.php';
require_once MAD_PATH . '/functions/adminredirect.php';
require_once MAD_PATH . '/www/cp/restricted.php';
require_once MAD_PATH . '/www/cp/admin_functions.php';
if (!check_permission('inventory', $user_detail['user_id'])) {
    exit;
}
if (!check_permission_simple('modify_publications', $user_detail['user_id'])) {
    exit;
}
global $current_action;
$current_action = 'edit';
if (isset($_POST['update'])) {
    if (do_edit('publication', $_POST, $_GET['id'])) {
        $edited = 1;
        MAD_Admin_Redirect::redirect('edit_publication.php?edited=1&id=' . $_GET['id'] . '');
    } else {
        $edited = 2;
    }
}
if ($edited != 2) {
    $editdata = get_publication_detail($_GET['id']);
}
require_once MAD_PATH . '/www/cp/templates/header.tpl.php';
?>

<div id="content">		
		
		<div id="contentHeader">
开发者ID:liulingfu,项目名称:madserve,代码行数:31,代码来源:edit_publication.php

示例12:

require_once '../../init.php';
// Required files
require_once MAD_PATH . '/www/cp/auth.php';
require_once MAD_PATH . '/functions/adminredirect.php';
require_once MAD_PATH . '/www/cp/restricted.php';
require_once MAD_PATH . '/www/cp/admin_functions.php';
if (!check_permission('inventory', $user_detail['user_id'])) {
    exit;
}
if (!check_permission_simple('modify_publications', $user_detail['user_id'])) {
    exit;
}
global $current_action;
$current_action = 'edit';
if (isset($_POST['update'])) {
    if (do_edit('location', $_POST, $_GET['id'])) {
        global $edited;
        $edited = 1;
        MAD_Admin_Redirect::redirect('edit_location.php?edited=1&id=' . $_GET['id']);
    } else {
        global $edited;
        $edited = 2;
    }
}
if ($edited != 2) {
    $editdata = get_location_details($_GET['id']);
    $editdata['location_name'] = $editdata['adv_location_name'];
    $editdata['location_lat'] = $editdata['adv_location_lat'];
    $editdata['location_lon'] = $editdata['adv_location_lon'];
}
require_once MAD_PATH . '/www/cp/templates/header.tpl.php';
开发者ID:liulingfu,项目名称:madserve,代码行数:31,代码来源:edit_location.php

示例13:

global $current_section;
$current_section = 'configuration';
require_once '../../init.php';
// Required files
require_once MAD_PATH . '/www/cp/auth.php';
require_once MAD_PATH . '/functions/adminredirect.php';
require_once MAD_PATH . '/www/cp/restricted.php';
require_once MAD_PATH . '/www/cp/admin_functions.php';
if (!check_permission('configuration', $user_detail['user_id'])) {
    exit;
}
global $current_action;
$current_action = 'edit';
if (isset($_POST['update'])) {
    if (do_edit('creative_server', $_POST, $_GET['id'])) {
        global $edited;
        $edited = 1;
        MAD_Admin_Redirect::redirect('edit_creative_server.php?edited=1&id=' . $_GET['id'] . '');
    } else {
        global $edited;
        $edited = 2;
    }
}
if ($edited != 2) {
    $editdata = get_creativeserver_detail($_GET['id']);
}
require_once MAD_PATH . '/www/cp/templates/header.tpl.php';
?>

    <div id="content">
开发者ID:aiurlano,项目名称:mAdserve-Fork,代码行数:30,代码来源:edit_creative_server.php

示例14: redirect

    redirect($returnurl);
} else {
    if ($blogeditform->no_submit_button_pressed()) {
        no_submit_button_actions($blogeditform, $sitecontext);
    } else {
        if ($fromform = $blogeditform->get_data()) {
            //save stuff in db
            switch ($action) {
                case 'add':
                    do_add($fromform, $blogeditform);
                    break;
                case 'edit':
                    if (!$existing) {
                        error('Incorrect blog post id');
                    }
                    do_edit($fromform, $blogeditform);
                    break;
                default:
                    error('Unknown action!');
            }
            redirect($returnurl);
        }
    }
}
// gui setup
switch ($action) {
    case 'add':
        // prepare new empty form
        $post->publishstate = 'site';
        $strformheading = get_string('addnewentry', 'blog');
        $post->action = $action;
开发者ID:BackupTheBerlios,项目名称:samouk-svn,代码行数:31,代码来源:edit.php

示例15:

global $current_section;
$current_section = 'adnetworks';
require_once '../../init.php';
// Required files
require_once MAD_PATH . '/www/cp/auth.php';
require_once MAD_PATH . '/functions/adminredirect.php';
require_once MAD_PATH . '/www/cp/restricted.php';
require_once MAD_PATH . '/www/cp/admin_functions.php';
if (!check_permission('adnetworks', $user_detail['user_id'])) {
    exit;
}
global $current_action;
$current_action = 'edit';
if (isset($_POST['update'])) {
    if (do_edit('network', $_POST, $_GET['id'])) {
        global $edited;
        $edited = 1;
        MAD_Admin_Redirect::redirect('network_settings.php?edited=1&id=' . $_GET['id'] . '');
    } else {
        global $edited;
        $edited = 2;
    }
}
if ($edited != 2) {
    $editdata = get_network_detail($_GET['id']);
}
require_once MAD_PATH . '/www/cp/templates/header.tpl.php';
?>

<div id="content">		
开发者ID:liulingfu,项目名称:madserve,代码行数:30,代码来源:network_settings.php


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