Example #1
0
<?php

header("Content-Type:text/html;charset=UTF-8");
include "../../../system.php";
include "../../system.php";
include "../../../gd.php";
include "../../../function/new_function.php";
include "cp_unit.php";
//System-----------------------------------------------------------
$now_table = $pro_color_relate_table;
//System-----------------------------------------------------------
$sam = new guard();
$unit = new pcolor();
$img = new img_uploader();
$upid = $_GET['upid'];
$cid = $_GET['cid'];
$sql = "select * from `{$pro_color_table}` where id='{$cid}'";
$res = mysql_query($sql);
$row = mysql_fetch_array($res);
$name = $row['name'];
$sql = "select * from `{$now_table}` where `upid`='{$upid}' and `cid`='{$cid}'";
$res = mysql_query($sql);
$now = mysql_num_rows($res);
if ($now == 0) {
    //Images UPLOAD------------------------------------------------------------
    $error = "";
    $msg = "";
    $fileElementName = 'colorUpload';
    if (!empty($_FILES[$fileElementName]['error'])) {
        switch ($_FILES[$fileElementName]['error']) {
            case '1':
Example #2
0
<?php

include "../../../system.php";
include "../../system.php";
include "../../../function/new_function.php";
include "cp_unit.php";
//System-----------------------------------------------------------
$now_table = $pro_color_relate_table;
//System-----------------------------------------------------------
$tool = new My_Tool();
$sam = new guard();
$unit = new pcolor();
$id = $_POST['id'];
$unit->table = $now_table;
$unit->id = $id;
$unit->get_db_var();
@unlink("../" . $unit->pic);
$unit->del();