Example #1
0
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv=Content-Type content="text/html; charset=utf-8">
		<meta http-equiv=Content-Language content=zh-CN>
		<title>迅傲信息</title>
		<?php 
include "../../frame.php";
?>
	</head>
	<body>
		<?php 
$image = new table_images_class();
if ($_POST['id'] != '') {
    $image->find($_POST['id']);
} else {
    $image->created_at = date("Y-m-d H:i:s");
    $image->publisher = $_SESSION["admin"];
}
//var_dump($_POST);
if ($_FILES['image']['name'] != null) {
    $upload = new upload_file_class();
    $upload->save_dir = "/upload/images/";
    $img = $upload->handle('image', 'filter_pic');
    if ($img === false) {
        alert('上传文件失败 !');
        redirect($_SERVER['HTTP_REFERER']);
    }
    $image->src = "/upload/images/" . $img;
    $image->create_thumb('middle', 50);
    $image->create_thumb('small', 170, 70);
Example #2
0
session_start();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv=Content-Type content="text/html; charset=utf-8">
		<meta http-equiv=Content-Language content=zh-CN>
		<title>迅傲信息</title>
		<?php 
include "../../frame.php";
?>
	</head>
	<body>
		<?php 
$image = new table_images_class();
if ($_POST['id'] != '') {
    $image->find($_POST['id']);
} else {
    $image->created_at = date("Y-m-d H:i:s");
}
$image->publisher = $_SESSION['admin_user_id'];
$image->update_file_attributes('image');
if ($_POST['image']["priority"] == null) {
    $image->update_attribute("priority", "100");
}
$image->update_attributes($_POST['image']);
if ($image->category_id != '') {
    redirect('image_list.php?category=' . $image->category_id);
} else {
    redirect('image_list.php');
Example #3
0
$ids = $news[0]->news_id;
for ($i = 1; $i < $news_count; $i++) {
    $ids .= ',' . $news[$i]->news_id;
}
if ($is_adopt == 1) {
    if ($ids != '') {
        array_push($c, "id in ({$ids})");
    } else {
        array_push($c, "id is null");
    }
} elseif ($is_adopt == '0') {
    if ($ids != '') {
        array_push($c, "id not in ({$ids})");
    }
}
$image = new table_images_class();
$images = $image->paginate('all', array('conditions' => implode(' and ', $c), 'order' => 'priority asc,created_at desc'), 12);
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv=Content-Type content="text/html; charset=utf-8">
	<meta http-equiv=Content-Language content=zh-CN>
	<title>迅傲信息</title>
	<?php 
css_include_tag('admin');
use_jquery();
js_include_tag('category_class', 'admin/position/image_list');
$category = new category_class('image');
$category->echo_jsdata();