Example #1
0
<?php

include '../includes/backend/mysqli_connect.php';
include '../includes/functions.php';
include '../includes/errors.php';
if ($gid = validate_id($_GET['gid'])) {
    $set = get_news_by_id($gid);
    $games = array();
    if (mysqli_num_rows($set) > 0) {
        $games = mysqli_fetch_array($set, MYSQLI_ASSOC);
    } else {
        redirect_to('admin/list_games.php');
    }
} else {
    redirect_to('admin/list_games.php');
}
$title_page = $games['type_name'];
include '../includes/backend/header-admin.php';
?>

	<div class="content-wrapper">
        <div class="container">
            <div class="row">
                <div class="col-md-11" style="margin-left: 4.1%">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h2 style="text-align: center"><?php 
echo $games['title'];
?>
</h2>
                            <h4 style="text-align: center" ><a href="index.php"><?php 
Example #2
0
<?php

include '../includes/backend/mysqli_connect.php';
include '../includes/functions.php';
include '../includes/errors.php';
if ($nid = validate_id($_GET['nid'])) {
    $set = get_news_by_id($nid);
    $news = array();
    if (mysqli_num_rows($set) > 0) {
        $news = mysqli_fetch_array($set, MYSQLI_ASSOC);
    } else {
        redirect_to('admin/list_news.php');
    }
} else {
    redirect_to('admin/list_news.php');
}
$title_page = $news['type_name'];
include '../includes/backend/header-admin.php';
?>

	<div class="content-wrapper">
        <div class="container">
            <div class="row">
                <div class="col-md-11" style="margin-left: 4.1%">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h2 style="text-align: center"><?php 
echo $news['title'];
?>
</h2>
                            <h4 style="text-align: center" ><a href="index.php"><?php 
Example #3
0
<?php

require 'header.php';
$id = $_GET['id'];
$row = get_news_by_id($id);
$path = get_image_src($id, 'update');
copy_image($path);
?>

<div id="updatenews"style="margin-left:150px;">
     <div style="float:left">
        <table>
            <tr><td class="text"id="title_text"><h4 >Վերնագիր</h4></td></tr>
            <tr><td><textarea rows="4" cols="10" name="title" id="newstitle"><?php 
echo $row['title'];
?>
</textarea></td></tr>
            <tr><td class="text" id="content_text"><h4 >Բովանդակ.</h4></td></tr>
            <tr><td><textarea rows="10" cols="10" name="content" id="content"><?php 
echo $row['content'];
?>
</textarea></td></tr>
            <tr><td class="text" id="video_title"><h4>Վիդեո</h4></td></tr>
            <tr><td><input type="text" name="video" id="video" value='<?php 
echo $row['video'];
?>
' /></td></tr>
            <tr><td>Նշել որպես գլխավոր<input id="heading"type="checkbox"style="width:50px;"<?php 
if ($row['heading']) {
    echo 'checked';
}