Exemplo n.º 1
0
             if (str2int(last_par_url($fs)) > 0) {
                 $slide['img'][] = 'http://funtime.ge:80' . $slide_dir . last_par_url($fs);
                 $slide['name'][] = '';
             }
         }
     }
     $slide = base64_encode(serialize(array('img' => $slide['img'], 'name' => $slide['name'])));
 } else {
     $slide = base64_encode(serialize($slider_images));
 }
 $operation = intval($_POST['op']);
 $comments = intval($_POST['comments']);
 $favorit_news = intval($_POST['favorit_news']);
 $text = str_replace("'", "`", PHP_slashes($_POST['textarea1']));
 if (!empty($_POST['sakimg'])) {
     $sak_dir = first_par_url($_POST['sakimg']);
     $sakfiles = glob($_SERVER['DOCUMENT_ROOT'] . generate_unknown($sak_dir) . '*.{jpeg,gif,png,jpg,JPG,PNG,GIF,JPEG}', GLOB_BRACE);
     $sakcount = count($sakfiles);
     sort($sakfiles);
     // echo generate_unknown($_SERVER['DOCUMENT_ROOT'].$slide_dir);
     for ($i = 0; $i < $sakcount; $i++) {
         if (in_array(get_file_name(last_par_url($sakfiles[$i])), $numbers)) {
             $sakim .= '<p><img src="http://funtime.ge:80' . $sak_dir . last_par_url($sakfiles[$i]) . '" width="700"/></p>';
         }
     }
     $text .= '<div class="fix"></div>' . $sakim;
 }
 $text_short = PHP_slashes($_POST['lidi']);
 $date_dd = intval($_POST['date_dd']);
 $date_mm = intval($_POST['date_mm']);
 $date_yy = intval($_POST['date_yy']);
Exemplo n.º 2
0
                    $response['body'] = stripslashes($text);
                    $response['id'] = $result;
                    echo json_encode($response);
                }
            } else {
                echo 1;
            }
        }
    } else {
        //$response['ajerror'] = "Facebook ფოტოს ზომა: 470x247";
        echo 0;
    }
}
if ($_POST['action'] == 'get_images_from_dir') {
    $slide = array();
    $slide_dir = first_par_url($_POST['url']);
    $slidefiles = glob($_SERVER['DOCUMENT_ROOT'] . generate_unknown($slide_dir) . '*.{jpeg,gif,png,jpg,JPG,PNG,GIF,JPEG}', GLOB_BRACE);
    $slicount = count($slidefiles);
    // echo generate_unknown($_SERVER['DOCUMENT_ROOT'].$slide_dir);
    if ($slicount > 0) {
        foreach ($slidefiles as $fs) {
            if (str2int(last_par_url($fs)) > 0) {
                $slide[] = 'http://funtime.ge:80' . $slide_dir . last_par_url($fs);
            }
        }
    }
    sort($slide);
    $slide = array('img' => $slide);
    echo json_encode($slide);
}
die;