Beispiel #1
0
} else {
    $action = @$_REQUEST["action"];
    $VipUser = $_COOKIE["AdminUser"];
    $title = @$_REQUEST["biaoti"];
    $content = @$_REQUEST["yaoqiu"];
    $pianshu = @$_REQUEST["pianshu"];
    $price = @$_REQUEST["jiage"];
    $data = date("Y-m-d H:i:s");
    $flag = @$_REQUEST["flag"];
    $encontent = @$_REQUEST["yijian"];
    $ID = @$_REQUEST["userid"];
    switch ($action) {
        case "add":
            $flag = 0;
            $flag1 = 3;
            $order_id = getyear($data) . getmonth($data) . getday($data) . rand(10000, 99999);
            $sqls = "select * from admin where AdminUser='******'";
            $results = mysql_db_query($dbname, $sqls);
            $rss = mysql_fetch_array($results);
            if ($rss != NULL) {
                $leixing = "软文代写";
                $sqlc = "insert into caiwu (order_id,VipUser,operator,leixing,jine,flag,data) values ('" . $order_id . "','" . $VipUser . "','" . $VipUser . "','" . $leixing . "'," . $price . "," . $flag1 . ",'" . $data . "')";
                mysql_db_query($dbname, $sqlc);
                $yue = $rss["yue"] - $price;
                $sqlu = "update admin set yue=" . $yue . " where AdminUser='******'";
                mysql_db_query($dbname, $sqlu);
                $sql = "insert into daixie_info (order_id,title,content,pianshu,price,VipUser,data,flag) values ('" . $order_id . "','" . $title . "','" . $content . "'," . $pianshu . "," . $price . ",'" . $VipUser . "','" . $data . "'," . $flag . ")";
                mysql_db_query($dbname, $sql);
                //mysql_select_db($dbname);
                //$result=mysql_query($sql);
                echo "<script>alert('提交代写成功!');location.href='daixie.php';</script>";
Beispiel #2
0
 /**
  * Cnews::edit()
  * 
  * @param integer $catalogue_id
  * @param integer $news_id
  * @return
  */
 function edit($catalogue_id = 0, $news_id = 0)
 {
     $newscatalogue = new newscatalogue($catalogue_id);
     if (!$newscatalogue->exists()) {
         show_404();
     }
     $news = new article($news_id);
     if ($_SERVER['REQUEST_METHOD'] == "GET") {
         if (!$news->exists()) {
         } else {
             if (getconfigkey('use_ftp')) {
                 $this->load->library('ftp');
                 $config['hostname'] = $this->cauhinh->where('fieldname', 'ftp_server')->get()->value;
                 $config['username'] = $this->cauhinh->where('fieldname', 'ftp_username')->get()->value;
                 $config['password'] = $this->cauhinh->where('fieldname', 'ftp_password')->get()->value;
                 if (empty($news->dir)) {
                     $ex = explode(' ', $news->created);
                     $createdate = $ex[0];
                     $y = getyear($createdate);
                     $m = getmonth($createdate);
                     $d = getday($createdate);
                     $ddir = "img/news/" . $y . '/' . $m . '/' . $d . '/' . md5(date("Y-m-d h:i:s")) . '/';
                     $news->dir = $ddir;
                     $news->save();
                     $this->_create_dir($ddir);
                 } else {
                     if ($this->ftp->list_files($news->dir) == FALSE) {
                         $this->_create_dir($news->dir);
                     }
                 }
                 $this->ftp->close();
             } else {
                 if (empty($news->dir)) {
                     $news->dir = getconfigkey("default_news_dir");
                 }
             }
         }
     } else {
         $this->load->helper('remove_vn_helper');
         $this->load->library('file_lib');
         $news->title_vietnamese = $this->input->post('title_vietnamese');
         $news->title_english = $this->input->post('title_english');
         $news->title_japanese = $this->input->post('title_japanese');
         $news->title_none = remove_vn($news->title_vietnamese);
         $news->author = $this->input->post('author');
         $news->tag = $this->input->post('tag');
         $tags = remove_vn($this->input->post('tag') . ' ' . $this->input->post('title_vietnamese') . ' ' . $this->input->post('short_vietnamese'));
         $tags = explode('-', $tags);
         $news->tag_search = implode(' ', $tags);
         $news->short_vietnamese = strip_tags($this->input->post('txtShort_vietnamese'));
         $news->full_vietnamese = $this->input->post('txtFull_vietnamese');
         $news->short_english = strip_tags($this->input->post('txtShort_english'));
         $news->full_english = $this->input->post('txtFull_english');
         $news->short_japanese = strip_tags($this->input->post('txtShort_japanese'));
         $news->full_japanese = $this->input->post('txtFull_japanese');
         $news->dir = $this->input->post('dir');
         $news->pagi = $this->input->post('pagi');
         if ($this->logged_in_user->adminrole->id == 1) {
             $news->navigation = $this->input->post('navigation');
             $news->menu_active = $this->input->post('menu_active');
             $news->old_id = $this->input->post('old_id');
         }
         $new_image = $this->input->post('newimage');
         if ($new_image == '1') {
             $dataupload = $this->file_lib->upload('image', "img/news");
             if (!is_array($dataupload)) {
                 flash_message('error', $dataupload);
             } else {
                 $news->image = $dataupload['file_name'];
                 $this->resize_image($news->dir . $dataupload['file_name']);
             }
         } else {
             $news->image = trim($this->input->post('imagelink'));
         }
         //newstopic
         $newstp = new newstopic($this->input->post('newstopic'));
         $newsc = new newscatalogue($this->input->post('newscatalogue'));
         if (!$news->exists()) {
             $news->active = 0;
         }
         if ($news->save(array($newsc, $newstp))) {
             $this->session->unset_userdata('dir_for_news');
             redirect($this->admin . 'cnews/edit/' . $news->newscatalogue->id . '/' . $news->id);
         } else {
             flash_message("error", "Lỗi");
         }
     }
     //setup start folder for kfm
     $newscat = new newscatalogue();
     $newscat->where('parentcat_id !=', 'NULL');
     $newscat->where('parentcat_id', $newscatalogue->parentcat_id);
     $newscat->order_by('position', 'asc');
     $newscat->get();
     $newstopic = new newstopic();
     $newstopic->order_by('id', 'desc');
     $newstopic->get();
     $sitelanguage = new Sitelanguage();
     $sitelanguage->order_by('position', 'asc');
     $sitelanguage->get();
     $dis['sitelanguage'] = $sitelanguage;
     $dis['newstopic'] = $newstopic;
     $dis['base_url'] = base_url();
     $dis['newscatalogue'] = $newscat;
     $dis['currentcatalogue'] = $newscatalogue;
     $dis['title'] = "Thêm/ Sửa trang";
     $dis['menu_active'] = "Tin";
     $dis['view'] = "news/edit";
     $dis['object'] = $news;
     $dis['nav_menu'] = array(array("type" => "back", "text" => "Back", "link" => "{$this->admin_url}cnews/list_all", "onclick" => ""));
     if ($this->logged_in_user->adminrole->id == 1 && $this->logged_in_user->adminrole->id == 1) {
         array_push($dis['nav_menu'], array("type" => "copymove", "text" => "Copy/Move", "link" => "javascript:void(0);", "onclick" => "show_copy()"));
     }
     $this->viewadmin($dis);
 }
Beispiel #3
0
<head >
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link  href="css/style.css" type="text/css" rel="stylesheet">
<title><?php 
echo $strAdminTitle;
?>
</title>
</head>

<body>
<?php 
$nowtime = time();
$year = date("Y", $nowtime);
$month = date("n", $nowtime);
$today = date("j", $nowtime);
$datas = getyear($year, $month);
$day == "" || !isset($day) ? $day = $today : ($day = $day);
$now = date("Y-n-j H:i:s", $nowtime);
$month_end = date("Y-n-j H:i:s", mktime(23, 59, 59, $month, $datas, $year));
$month_beging = date("Y-n-j H:i:s", mktime(0, 0, 0, $month, 1, $year));
//Ô·ÃÎÊÁ¿
$sum = "1th_day + 2th_day + 3th_day + 4th_day + 5th_day + 6th_day + 7th_day + 8th_day + 9th_day + 10th_day + 11th_day + 12th_day + 13th_day + 14th_day + 15th_day + 16th_day + 17th_day + 18th_day + 19th_day + 20th_day + 21th_day + 22th_day + 23th_day + 24th_day + 25th_day + 26th_day + 27th_day + 28th_day + 29th_day + 30th_day + 31th_day";
$msql->query("select {$sum} as sum from {P}_tools_statdate where id = '{$month}'");
if ($msql->next_record()) {
    $countid_month = $msql->f('sum');
}
if ($countid_month == 0) {
    $countid_month = 1;
}
?>
 
Beispiel #4
0
<head >
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link  href="css/style.css" type="text/css" rel="stylesheet">
<title><?php 
echo $strAdminTitle;
?>
</title>
</head>

<body>
<?php 
$nowtime = time();
$year = date("Y", $nowtime);
$month = date("n", $nowtime);
$thismonth == "" || !isset($thismonth) ? $getmonth = $month : ($getmonth = $thismonth);
$datas = getyear($year, $getmonth);
$sum_month = "1th_day + 2th_day + 3th_day + 4th_day + 5th_day + 6th_day + 7th_day + 8th_day + 9th_day + 10th_day + 11th_day + 12th_day + 13th_day + 14th_day + 15th_day + 16th_day + 17th_day + 18th_day + 19th_day + 20th_day + 21th_day + 22th_day + 23th_day + 24th_day + 25th_day + 26th_day + 27th_day + 28th_day + 29th_day + 30th_day + 31th_day";
$msql->query("select * from {P}_tools_statdate where id = '{$month}'");
if ($msql->next_record()) {
    for ($d = 1; $d < 31; $d++) {
        $countid_month = $msql->f($d . 'th_day');
        $month_sum += $countid_month;
    }
}
for ($m = 1; $m <= 12; $m++) {
    $msql->query("select {$sum_month} as sum from {P}_tools_statdate where id = '{$m}'");
    if ($msql->next_record()) {
        $countid_month = $msql->f('sum');
    }
    $sum += $countid_month;
}
    
    
<?php 
$Mona[] = JHTML::_('select.option', '01', JTEXT::_('Januar'), 'id', 'title');
$Mona[] = JHTML::_('select.option', '02', JTEXT::_('Februar'), 'id', 'title');
$Mona[] = JHTML::_('select.option', '03', JTEXT::_('März'), 'id', 'title');
$Mona[] = JHTML::_('select.option', '04', JTEXT::_('April'), 'id', 'title');
$Mona[] = JHTML::_('select.option', '05', JTEXT::_('Mai'), 'id', 'title');
$Mona[] = JHTML::_('select.option', '06', JTEXT::_('Juni'), 'id', 'title');
$Mona[] = JHTML::_('select.option', '07', JTEXT::_('Juli'), 'id', 'title');
$Mona[] = JHTML::_('select.option', '08', JTEXT::_('August'), 'id', 'title');
$Mona[] = JHTML::_('select.option', '09', JTEXT::_('September'), 'id', 'title');
$Mona[] = JHTML::_('select.option', '10', JTEXT::_('Oktober'), 'id', 'title');
$Mona[] = JHTML::_('select.option', '11', JTEXT::_('November'), 'id', 'title');
$Mona[] = JHTML::_('select.option', '12', JTEXT::_('Dezember'), 'id', 'title');
$years = getyear();
?>

<form action="#">   
	<div class="container-fluid">
		<div class="well row-fluid" id="catbox" style="width:98%;margin-left:0px;padding-bottom:0px;padding-top:10px;"> 
			 <?php 
echo JHTML::_('select.genericlist', $Mona, 'selectstartmonth', 'class="eiko_gmap_month_select" onchange=selectdate() ', 'id', 'title', $Monat);
echo JHTML::_('select.genericlist', $years, 'selectstartyear', 'class="eiko_gmap_year_select" onchange=selectdate() ', 'id', 'title', $selectedYear);
echo ' bis ';
echo JHTML::_('select.genericlist', $Mona, 'selectendmonth', 'class="eiko_gmap_month_select" onchange=selectdate() ', 'id', 'title', $Monat);
echo JHTML::_('select.genericlist', $years, 'selectendyear', 'class="eiko_gmap_year_select" onchange=selectdate() ', 'id', 'title', $selectedYear);
?>
<button type="button" id="einsatzarten_flip" class="btn btn-sm">Einsatzarten auswählen</button>
		</div>