Exemplo n.º 1
0
/**
 *
 * @param unknown $id
 * @return string
 */
function delHouse($id)
{
    $where = "id={$id}";
    $res = delete("homarget_house", $where);
    $houseImgs = getAllImgsByHouseId($id);
    if ($houseImgs && is_array($houseImgs)) {
        foreach ($houseImgs as $houseImg) {
            if (file_exists("uploads/" . $houseImg['img_path'])) {
                unlink("uploads/" . $proImg['img_path']);
            }
            if (file_exists("../image_50/" . $houseImg['img_path'])) {
                unlink("../image_50/" . $proImg['img_path']);
            }
            // 			if(file_exists("../image_220/".$houseImg['img_path'])){
            // 				unlink("../image_220/".$proImg['img_path']);
            // 			}
            // 			if(file_exists("../image_350/".$houseImg['img_path'])){
            // 				unlink("../image_350/".$proImg['img_path']);
            // 			}
            // 			if(file_exists("../image_800/".$houseImg['img_path'])){
            // 				unlink("../image_800/".$houseImg['img_path']);
            // 			}
        }
    }
    $where1 = "album_id={$id}";
    $res1 = delete("tigris_album", $where1);
    if ($res && $res1) {
        $mes = "Delete success!<br/><a href='listHouse.php' target='mainFrame'>View house list</a>";
    } else {
        $mes = "Failed!<br/><a href='listHouse.php' target='mainFrame'>Delete</a>";
    }
    return $mes;
}
Exemplo n.º 2
0
    ?>
    		<div class="tab-pane fade in active" id="photos-tab">
                <div class="col-md-12">
                    <table class="table table-condensed table-hover">
                        <caption style="padding:10px 0 10px 20px;border:1px solid #ccc;margin-top:20px;background:#ccc;color:white;">Photo Management</caption>
                        <tbody>
                        <tr>
                            <td>
                                <h3>1. Click the image that you want to delete;</h3>
                                <h3>2. Click "Yes" on the pop up window to delete the image.</h3>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            <?php 
    $houseImgs = getAllImgsByHouseId($id);
    foreach ($houseImgs as $img) {
        if (!empty($img['img_path'])) {
            ?>
                			    <img style="cursor:pointer;width:150px;height:150px;margin-bottom:10px;" src="uploads/House_Album/user_id_<?php 
            echo $id . "/" . $img['img_path'];
            ?>
" onclick="delImg('<?php 
            echo $img['album_id'];
            ?>
','<?php 
            echo $img['img_path'];
            ?>
')" /> &nbsp;
                			<?php 
        }
Exemplo n.º 3
0
$row_email = fetchOne($sql_email);
$sql_user = "******";
$row_user = fetchOne($sql_user);
$sql_house = "select * from tg_host_house where house_id={$id}";
$row_house = fetchOne($sql_house);
//print_r($row_house);
$sql_services = "select * from tg_host_services where services_id={$id}";
$row_services = fetchOne($sql_services);
//print_r($row_services);
$sql_location = "select * from tg_house_location where location_id={$id}";
$row_location = fetchOne($sql_location);
//print_r($row_location);
$sql_calendar = "select * from tg_host_calendar where calendar_id={$id}";
$row_calendar = fetchOne($sql_calendar);
//取锟斤拷同一锟斤拷album_id 锟斤拷锟斤拷锟斤拷图 Get all imgs with identity album_id using in images_ablum display
$rows = getAllImgsByHouseId($id);
//Get data from tg_house_img
$sql_img = "select * from tg_house_img where album_id={$id}";
$rows = fetchAll($sql_img);
?>


<!-- Page Content -->
<div class="container">

    <!-- Page Heading/Breadcrumbs -->
        <div class="row">
            <?php 
if ($row_calendar['is_avail'] == 0) {
    ?>
            <div class="breadcrumb text-center" style="padding:10px 0;color:rgb(217,83,79);background:#fff;">
Exemplo n.º 4
0
    ?>
" class="check" value=<?php 
    echo $row['house_id'];
    ?>
><label for="c1" class="label"><?php 
    echo $row['house_id'];
    ?>
</label></td>

                <td><?php 
    echo $row['house_title'];
    ?>
</td>
				<td>
        			<?php 
    $houseImgs = getAllImgsByHouseId($row['house_id']);
    foreach ($houseImgs as $img) {
        ?>
        			<img width="100" height="100" src="../uploads/House_Album/user_id_<?php 
        echo $img['album_id'] . "/" . $img['img_path'];
        ?>
" onclick="delImg('<?php 
        echo $img['album_id'];
        ?>
','<?php 
        echo $img['img_path'];
        ?>
')" /> &nbsp;
        			<?php 
    }
    ?>