<div id="dialog-message" title="Ihr Bild" style="display: none; width: 900px;"> </div> <a href="index.php" class="button expand" style="height: 140px!important; text-align: center!important; font-size: 2.0em!important;"<br><span style="color: #d8d8d8; font-size: 2.4em;">Zurück</span></a> <ul class="clearing-thumbs" data-clearing> <?php function sortDate($a, $b) { return $b['unxmod'] - $a['unxmod']; } $dir = 'images/original/'; $files = glob($dir . "*.{" . Constans::getFileTypes() . "}", GLOB_BRACE); $array = array(); $array2 = array(); foreach ($files as $file) { $array['filepath'] = $file; $array['filename'] = substr($file, strlen($dir)); $array['modtime'] = date("Y-m-d H:i:s", filectime($file)); $array['unxmod'] = filectime($file); array_push($array2, $array); } usort($array2, "sortDate"); /* echo '<pre>'; print_r($array2); echo '</pre>'; */
$("#image").html(jdat.data.img); $("#imageMessage").html(jdat.data.msg); }, error: function(xhr) { } }); } </script> <div class="row"> <div class="large-12 columns"> <span style="font-size: 1.4em;">Bitte geben Sie den <?php echo Constans::getUniqueCnt(); ?> -stelligen Code ein. Diesen finden Sie auf Ihrem Ausdruck links oben.</span> </div> </div> <form id="FotoPin"> <div class="row" style="margin-top: 65px!important;"> <div class="large-12 columns"> <div class="row collapse prefix-radius"> <div class="small-12 columns"> <input class="idinput" type="text" style="text-align: center; text-transform:uppercase;" maxlength="8" id="fotopin" name="fotopin" placeholder="_ _ _ _ _ _ _ _"> </div> </div> </div>
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ require_once '../../etc/conf.php'; $server_documentroot = Constans::getDocRoot(); $dir = Constans::getUniqueImgDir(); $fotopin = strtoupper($_POST['fotopin']); if (strlen($fotopin) != Constans::getUniqueCnt()) { $res = array('data' => array('code' => '400', 'msg' => 'pin not match - to short')); print_r(json_encode($res)); die; } elseif (!preg_match("#^[a-zA-Z0-9]+\$#", $fotopin)) { $res = array('data' => array('code' => '400', 'msg' => 'pin not match - mix int and char')); print_r(json_encode($res)); die; } $files = glob($dir . "*" . $fotopin . "*.{" . Constans::getFileTypes() . "}", GLOB_BRACE); if (empty($files)) { $imgsrc = 'notFound.png'; $res = array('data' => array('code' => '400', 'img' => '<img src="/images/system/' . $imgsrc . '">', 'msg' => 'Bild zum Code ' . $fotopin . ' existiert nicht')); print_r(json_encode($res)); die; } $imgsrc = substr($files[0], strlen(Constans::getUniqueImgDir())); $res = array('data' => array('code' => '200', 'msg' => '<img src="/images/original/' . $imgsrc . '">')); print_r(json_encode($res));