Example #1
0
     wp_redirect($this_file);
     exit;
     break;
 case 'add':
     check_admin_referer('add-bookmark');
     $redir = wp_get_referer();
     if (add_link()) {
         $redir = add_query_arg('added', 'true', $redir);
     }
     wp_redirect($redir);
     exit;
     break;
 case 'save':
     $link_id = (int) $_POST['link_id'];
     check_admin_referer('update-bookmark_' . $link_id);
     edit_link($link_id);
     wp_redirect($this_file);
     exit;
     break;
 case 'delete':
     $link_id = (int) $_GET['link_id'];
     check_admin_referer('delete-bookmark_' . $link_id);
     wp_delete_link($link_id);
     wp_redirect($this_file);
     exit;
     break;
 case 'edit':
     wp_enqueue_script('link');
     wp_enqueue_script('xfn');
     $parent_file = 'link-manager.php';
     $submenu_file = 'link-manager.php';
         $err = validate_link_form($vars);
         if (!$err) {
             $err = add_link($vars);
             if (!$err) {
                 display_banners();
                 break;
             }
         }
     }
     display_link_form($vars, $err);
     break;
 case 'edit_link':
     if ($vars['save']) {
         $err = validate_link_form($vars);
         if (!$err) {
             $err = edit_link($vars, $vars['banner_id']);
             if (!$err) {
                 display_banners();
                 break;
             } else {
                 $b = $vars;
             }
         } else {
             $b = $vars;
         }
     } else {
         $b = $config['aff']['links'][$vars['banner_id']];
     }
     display_link_form($b, $err);
     break;
 case 'del_link':
function add_link()
{
    return edit_link();
}
Example #4
0
         if (add_link()) {
             redirect('?view=informers');
         } else {
             redirect();
         }
         //иначе на эту же страницу возвращаемся
     }
     break;
 case 'edit_link':
     //редактирование страницы информера
     $link_id = (int) $_GET['link_id'];
     $informers = get_informers();
     //получаем список всех информеров
     $get_link = get_link($link_id);
     if ($_POST) {
         if (edit_link($link_id)) {
             redirect('?view=informers');
         } else {
             redirect();
         }
         //иначе на эту же страницу возвращаемся
     }
     break;
 case 'del_link':
     //удаление страницы информера
     $link_id = (int) $_GET['link_id'];
     del_link($link_id);
     redirect();
     break;
 case 'edit_page':
     //редактирование страницы
Example #5
0
     if (empty($url)) {
         $url = $title;
     }
     edit_image($title, $tag, $url, $content, $oldfile, $destination, $description, $dateTime, $image, $revertPost, $publishDraft, $category);
 } else {
     if ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($video)) {
         if (empty($url)) {
             $url = $title;
         }
         edit_video($title, $tag, $url, $content, $oldfile, $destination, $description, $dateTime, $video, $revertPost, $publishDraft, $category);
     } else {
         if ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($link)) {
             if (empty($url)) {
                 $url = $title;
             }
             edit_link($title, $tag, $url, $content, $oldfile, $destination, $description, $dateTime, $link, $revertPost, $publishDraft, $category);
         } else {
             if ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($quote)) {
                 if (empty($url)) {
                     $url = $title;
                 }
                 edit_quote($title, $tag, $url, $content, $oldfile, $destination, $description, $dateTime, $quote, $revertPost, $publishDraft, $category);
             } else {
                 if ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($audio)) {
                     if (empty($url)) {
                         $url = $title;
                     }
                     edit_audio($title, $tag, $url, $content, $oldfile, $destination, $description, $dateTime, $audio, $revertPost, $publishDraft, $category);
                 } else {
                     if ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($is_post)) {
                         if (empty($url)) {
Example #6
0
the_title();
?>
</title>
	<?php 
print_header_scripts();
print_styles();
?>
</head>
<body>
<header></header>
<section class="main">
	<article class="content">
		<?php 
the_content();
?>
		<footer class="meta"><?php 
edit_link();
?>
</footer>
	</article>
	<aside class="page-list">
		<?php 
list_pages();
?>
	</aside>
</section>
<?php 
print_footer_scripts();
?>
</body>
</html>
Example #7
0
    start_table(" class='table table-bordered table-striped table-hover' ");
    $head = array('Id Item', 'Item Code', 'Item Name', 'Brand', 'Unit Price', 'Discount', 'Weight', 'Qty On Hand', 'Qty On PO', 'Qty On SO', 'Category', 'Image', 'Size', 'Action');
    head_table($head);
    while ($row = db_fetch($query)) {
        start_row("class='odd gradeX'");
        text_cell($row['id'], "align='center'");
        text_cell($row['item_code'], "align='left'");
        text_cell($row['item_name'], "align='left'");
        text_cell($row['brand_name'], "align='left'");
        //unit price - discount = harga jual
        text_cell(price_format($row['unit_price']), "align='right'");
        text_cell(price_format($row['discount']), "align='right'");
        text_cell(price_format($row['weight']), "align='right'");
        text_cell($row['qty_on_hand'], "align='center'");
        text_cell($row['qty_on_po'], "align='center'");
        text_cell($row['qty_on_so'], "align='center'");
        colom_link_text("index.php?" . $parameter_key . "kd_tabel=tb_maping_item_category&item=" . $row['id'], "category", $params);
        colom_link_text($link, "image", $params);
        colom_link_text("index.php?" . $parameter_key . "kd_tabel=tb_maping_item_size&item=" . $row['id'], "size", $params);
        start_column("align='center' ");
        edit_link('tb_items', $row['id'], $_SESSION['key']);
        end_column();
        end_row();
    }
    end_table();
}
end_form();
br();
//end div kotak
end_div();
//------------------------------------------------------------------------------