示例#1
0
			   $("#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>
示例#2
0
        the Free Software Foundation, either version 3 of the License, or
        (at your option) any later version.

        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;
}