Beispiel #1
0
<?
include("views/admin_header.php");
require_once("../model/m_action.php");
$m_action = new M_action;
$edit=false;
$action=null;
if (isset($_GET['edit'])) {
    $edit=true;
    $action=$m_action->get_action_by_id($_GET['id'])->result;
}else if (isset($_POST['title'])) {
    if (isset($_POST['id'])) {
        $action=$m_action->get_action_by_id($_POST['id'])->result;
        $data = array(
            'title' => $_POST['title'], 
            'description' => $_POST['description'], 
            'title_en' => $_POST['title_en'], 
            'description_en' => $_POST['description_en'], 
            'detail_title' => $_POST['detail_title'], 
            'detail_description' => substr($_POST['detail_description'], 0,4999), 
            'detail_title_en' => $_POST['detail_title_en'], 
            'detail_description_en' => substr($_POST['detail_description_en'], 0,4999), 
            );
        $m_action->update_action($data,$_POST['id']);
        $sort_order=1;
        foreach ($_POST['file_path'] as $key => $value) {
            $filename = $value;
            $pos = strpos($filename, "old_file_picture__");
            if ($pos === false&&$filename!="") {

                $ad_pid=$m_action->generate_pid();
Beispiel #2
0
<?
require_once("./model/m_action.php");
$m_action = new M_action;
$action=$m_action->get_action_by_id($_GET['info'])->result;
if (!isset($action[0]['id'])) {
    ?>
    <script type="text/javascript">
        window.open("./index-in.php","_self");
        </script>
    <?
}
$photo_arr=$m_action->get_all_action_photo($action[0]['id']);
$action[0]['photo']=$photo_arr->result;

?>
<!-- HEAD CONTENT ************************** -->
<style type="text/css">
    .s4.head-adv {
        background-image: url("./media/action/<?php 
echo $action[0]['photo'][1]['filename'];
?>
");
    }
</style>
<div class="head-adv section s4">
    <!-- Advisor info desk -->
    <div class="redoverlay"></div>
    <div class="adv-desk">
        <div class="container">
            <div class="row">
                <div class="twelve columns">