Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (@$_GET["action"]==1) {
- session_start();
- session_destroy();
- session_commit();
- session_start();
- $_SESSION["startpic"]=1;
- //header("Expires: Wed, 01 July 2009 00:00:00");
- //header("Cache-Control: no-store, no-cache, must-revalidate, private");
- //header("Pragma: no-cache");
- }
- ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta http-equiv="Cache-Control" content="no-cache" />
- <meta name="description" content="Упражнение по PHP, галлерея изображений" />
- <meta name="keywords" content="html,css,javascript,jquery" />
- <title>Упражнение по PHP, галлерея изображений FTG</title>
- <script type="text/javascript" src="js/jquery-1.7.2.js"></script>
- </head>
- <style type="text/css">
- * {
- margin:0;
- padding:0;
- font-family: verdana, sans-serif;
- font-size:10pt;
- }
- body {
- background-color: #eee;
- background-image: url(data:image/gif;base64,R0lGODlhCAAIAJEAAMzMzP///////wAAACH5BAEHAAIALAAAAAAIAAgAAAINhG4nudroGJBRsYcxKAA7);
- }
- #allcontent {
- margin:20px;
- background:#f0f0f0;
- }
- /*----------------------------------*/
- #addpic {
- display:none;
- position:absolute;
- height:100px;
- width:500px;
- background:#eee;
- z-index:5;
- padding:10px;
- /*border:solid 1px black;*/
- }
- #addpic label {
- width:8em;
- float:left;
- text-align:right;
- margin-right:1em;
- display:block;
- }
- #addpic .submit input {
- margin-left:8.5em;
- margin-top:4px;
- color:#000;
- background:#ffefaf;
- border: 1px outset #d7b9c9;
- cursor:pointer;
- padding:2px 5px;
- }
- #addpic fieldset {
- border:1px solid #781351;
- width:35em;
- padding:1em;
- }
- #addpic legend {
- color:#fff;
- background:#ffa20c;
- border:1px solid #781351;
- padding: 2px 6px;
- }
- /*----------------------------------*/
- #header {
- height:100px;
- background:#444;
- -moz-border-radius: 30px;
- -webkit-border-radius: 30px;
- bordre-radius: 30px;
- }
- #headerlinks {
- position:relative;
- left:40%;
- bottom:50px;
- width:150px;
- height:14px;
- padding:2px 5px 5px 20px;
- line-height:1.5;
- background:#999;
- border:solid 1px white;
- z-index:10;
- overflow:hidden;
- }
- #headerlinks a {
- text-decoration:none;
- color:white;
- display:block;
- }
- /*----------------------------------*/
- #pics {
- /*min-height:400px;*/
- }
- #wideblock {
- overflow:hidden;
- }
- #traceblock {
- position:absolute;
- width:300px;
- height:400px;
- background:#333;
- border:solid 1px yellow;
- color:#9f9;
- font-size:10px;
- z-index:10;
- opacity:0.8;
- filter:alpha(opacity=80);
- left:50px;
- top:50px;
- }
- .frameblock {
- border-right:dotted 1px red;
- float:left;
- }
- .picsin {
- float:left;
- border-right:dotted 1px black;
- border-bottom:dotted 1px black;
- padding:10px;
- height:200px;
- overflow:hidden;
- cursor:pointer;
- }
- #bigpic {
- position:absolute;
- background-color:black;
- opacity:0;
- padding:auto;
- overflow:hidden;
- display:none;
- border:ridge 2px white;
- z-index:100;
- }
- #bigpicin {
- margin:10px;
- overflow:hidden;
- }
- /*----------------------------------*/
- #footer {
- height:100px;
- color:white;
- clear:both;
- background:#888;
- }
- #statusdiv {
- float:left;
- width:500px;
- }
- #statusdiv3 {
- margin-left:510px;
- }
- /*----------------------------------*/
- .button {
- background:#f90;
- color:white;
- font: italic bold 1em/20px 'tebuchet MS', Arial, helvetica;
- opacity: .8;
- filter: alpha(opacity=80);
- -moz-border-radius: 20px;
- -webkit-border-radius: 20px;
- border-radius:20px;
- height:20px;
- width: 70px;
- padding:10px;
- text-align:center;
- position:relative;
- left:50px;
- top: 20px;
- cursor:pointer;
- }
- /*----------------------------------*/
- #winout {
- position:absolute;
- width:0;
- height:0;
- top:0;
- left:0;
- opacity:0;
- filter:alpha(opacity=0);
- overflow:scroll;
- background:#666;
- color:#ff6;
- padding:15px;
- border:solid 1px black;
- display:none;
- }
- /*----------------------------------*/
- #hiddregs {
- display:none;
- }
- #cont2 {
- background:#ffd;
- float:left;
- width:100%;
- }
- #cont1 {
- background:#ffe;
- position:relative;
- width:68%;
- left:400px;
- float:left;
- padding-top:10px;
- padding-bottom:10px;
- }
- /*----------------------------------*/
- #regslist {
- float:left;
- position:relative;
- border:dotted 1px red;
- right:400px;
- width:380px;
- padding:10px;
- }
- #regslist ul {
- list-style-type:none;
- list-style-position:outside;
- line-height:25px;
- white-space: nowrap;
- text-indent:15px;
- width:70%;
- margin-left:20px;
- }
- #regslist li {
- border-bottom: dotted 1px #eee;
- font-size:medium;
- }
- #regslist li.active {
- background:#800;
- color:white;
- font-weight:bold;
- }
- #regslist li:hover {
- cursor:pointer;
- }
- /*----------------------------------*/
- #parseres {
- position:relative;
- margin-left:15px;
- right:400px;
- padding:10px;
- width:300px;
- border:dotted 1px green;
- float:left;
- }
- #parseres ul {
- list-style-type:none;
- list-style-position:outside;
- line-height:20px;
- padding-left:30px;
- }
- #parseres li {
- }
- #parseres li.active {
- background:#800;
- }
- #parseres li.active a {
- color:white;
- font-weight:bold;
- }
- #parseres a {
- color:#944;
- }
- /*----------------------------------*/
- #statframe {
- margin-left:350px;
- border:dotted 1px #f90;
- margin-right:5px;
- padding:30px;
- height:350px;
- width:400px;
- position:relative;
- }
- #statframe iframe {
- position:absolute;
- top:10px;
- left:10px;
- width:95%;
- border:solid 1px black;
- height:350px;
- }
- /*----------------------------------*/
- #conmenid {
- position:absolute;
- width:200px;
- height:50px;
- border:solid 1px black;
- background:#f5f5f5;
- padding:10px;
- display:none;
- }
- #conmenid a {
- color:#b00;
- font-weight:bold;
- text-decoration:none;
- }
- /*----------------------------------*/
- .hidden_block {
- display:none;
- }
- /*----------------------------------*/
- </style>
- <?php if(@$_GET["action"]==1):?>
- <script type="text/javascript">G_Action=1;</script>
- <?php else:?>
- <script type="text/javascript">G_Action=2;</script>
- <?php endif?>
- <!------------------------------------------------------------------------------>
- <script type="text/javascript">
- //---------------------------------------------------------------------------
- // Slider Object
- //---------------------------------------------------------------------------
- (function ($) {
- RSlider= function (options) {
- var my=this;
- //--------------------------
- this.defaults= {
- targetId: 'pics',
- ajax_url: 'req4.php'
- }
- //--------------------------------initialization
- this.init = function (options) {
- my.options= $.extend(true,{},my.defaults,options);
- my.currentFrame=1;
- my.nFrames=0;
- //my.frameWidth=600;
- this.targetDiv=$('#'+this.options.targetId);
- this.targetDiv.css({'overflow':'hidden','position':'relative'});
- my.frameWidth=this.targetDiv.width();
- this.Tracer.init();
- my.wr=this.Tracer.wr;
- this.drawblocks();
- this.wideBlock=this.targetDiv.find('#wideblock');
- this.drawFrame();
- this.drawFrame();
- this.mouseDrag.init();
- }
- //------------------------------draw main structure
- this.drawblocks = function () {
- var wideBlock = $ ('<div>', {id:"wideblock",
- css:{position:'relative'}});
- wideBlock.css('width',my.frameWidth+'px');
- this.targetDiv.append(wideBlock);
- }
- //------------------------------ajax request
- this.ajax_request=function (param, f3) {
- $.ajax ( {
- type: "POST",
- url: this.options.ajax_url,
- data: param} ).done(
- function(html) {f3.targetEl.ajax_result=f3.show(html);});
- }
- //------------------------------append new frame
- this.drawFrame = function () {
- var frameBlock = $('<div>', {"class":"frameblock",
- css:{width:my.frameWidth+'px'}});
- var tmpBlock=frameBlock.clone();
- if (my.testB)
- my.testB++;
- else
- my.testB=100;
- tmpBlock.ajax_result=0;
- tmpBlock.waitcount=10;
- tmpBlock.testB=my.testB;
- this.load_pics(tmpBlock);
- //-------------------------
- setTimeout(function() {
- rrr(tmpBlock);
- } ,100);
- //-------------------------
- function rrr(inblock) {
- inblock.waitcount--;
- my.wr('wait load '+inblock.testB+':'+inblock.waitcount);
- if (inblock.waitcount==0) {
- my.wr('timeout '+inblock.testB);
- return;
- }
- if (inblock.ajax_result==0) {
- setTimeout(function() {rrr(inblock);},1000);
- return;
- }
- //alert(inblock.testB+' - '+inblock.ajax_result);
- if (inblock.ajax_result==4) {
- my.nFrames++;
- my.wideBlock.css('width',my.wideBlock.width()+my.frameWidth+'px');
- my.wideBlock.append(inblock);
- my.wr('success '+inblock.testB);
- //alert(my.nFrames);
- } else {
- my.wr('empty '+inblock.testB);
- }
- }
- //-------------------------
- }
- //------------------------------load pictures
- this.load_pics = function (el) {
- var zShow_pics = new this.show_pics(el);
- my.wr('load page '+el.testB);
- this.ajax_request({req:"showparsed"},zShow_pics);
- }
- //------------------------------show pictires FTG object
- this.show_pics = function (el) {
- this.targetEl = el;
- //---------------------------
- this.show = function (html) {
- if (html=='[]')
- return 3;
- var json_resp=eval("("+html+")");
- var picdiv = $('<div>', {'class':'picsin'});
- var img= $('<img>',{});
- for (var i=0; i<json_resp.length; i++) {
- var npd=picdiv.clone();
- var nimg=img.clone();
- //nimg.attr('height',200);
- nimg.attr('src',json_resp[i]["small"]);
- nimg.data('lgpath',json_resp[i]["big"]);
- var imBig = new Image();
- imBig.ss=nimg.data('lgpath');
- imBig.onload=function() {
- my.wr('loaded image: '+this.ss);
- }
- imBig.src=imBig.ss;
- nimg.get(0).imBig=imBig;
- //nimg.click(big_pic);
- //---------------------------
- npd.append(nimg);
- $(this.targetEl).append(npd);
- }
- return 4;
- }
- //---------------------------
- }
- //------------------------------move slider
- this.slide_to= function(direction) {
- if (((direction=='left') && (my.currentFrame==1)) ||
- ((direction=='right') && (my.currentFrame==my.nFrames))) {
- my.animating=false;
- return;
- }
- switch (direction) {
- case 'left': my.currentFrame--;break;
- case 'right':my.currentFrame++;break;
- }
- var c_left=-(my.currentFrame-1)*my.frameWidth;
- my.wr('slide: frame='+my.currentFrame);
- $.when(my.wideBlock.animate({left: c_left},"slow")).done(function(){my.animating=false});
- if (my.currentFrame==my.nFrames) {
- my.drawFrame();
- }
- }
- //------------------------------mouse dragging
- this.mouseDrag = {
- init: function () {
- my.targetDiv.bind('mousedown',this.mouseDown);
- },
- //----------------------------------
- getRect: function () {
- var z=my.targetDiv;
- return {left: z.position().left,
- top: z.position().top,
- right: z.position().left+z.width(),
- bottom: z.position().top+z.height()
- }
- },
- //----------------------------------
- mouseDown: function (e) {
- e = e || event;
- my.tRect=my.mouseDrag.getRect();
- my.diffX=0;
- my.moved=false;
- my.inside=true;
- my.prevX=e.clientX;
- $(document).bind('mouseup',my.mouseDrag.mouseUp);
- $(document).bind('mousemove',my.mouseDrag.mouseMove);
- return false;
- },
- //----------------------------------
- mouseMove: function(e) {
- e = e || event;
- if (!my.animating) {
- my.diffX+=e.clientX-my.prevX;
- if (Math.abs(my.diffX)>30) {
- my.moved=true;
- my.animating=true;
- var diffX=my.diffX;
- my.diffX=0;
- if (diffX<0) {
- my.slide_to('right');
- } else {
- my.slide_to('left');
- }
- }
- }
- my.prevX=e.clientX;
- my.inside=true;
- if ((e.clientX <= my.tRect.left) || (e.clientX >= my.tRect.right) ||
- (e.clientY <= my.tRect.top) || (e.clientY >= my.tRect.bottom)) {
- my.inside=false;
- $(this).mouseup();
- }
- return false;
- },
- //----------------------------------
- mouseUp: function (e) {
- e = e || event;
- $(document).unbind('mouseup',my.mouseDrag.mouseUp);
- $(document).unbind('mousemove',my.mouseDrag.mouseMove);
- if ((my.inside) && (!my.moved)) {
- var target = e.target || e.srcElement;
- var bigIm=target.imBig;
- //alert(target.imBig);
- var zzblock=$('#bigpicin');
- zzblock.empty();
- zzblock.append(bigIm);
- $('#bigpic').css('display','block');
- $('#bigpic').animate({opacity:1},"slow");
- }
- }
- }
- //----------------------------------------------Tracer
- this.Tracer = {
- traceBlock: {},
- //----------------------------
- init : function() {
- var traceBlock = $('<div>', {'id':'traceblock'});
- my.targetDiv.append(traceBlock);
- this.traceBlock=$('#traceblock');
- this.wr('start');
- },
- //----------------------------
- wr :function(instr) {
- ht=my.Tracer.traceBlock.html();
- my.Tracer.traceBlock.html(instr+'<br />'+ht);
- }
- }
- //-------------------------------------------------
- this.init(options);}
- }) (jQuery);
- </script>
- <!------------------------------------------------------------------------------>
- <script type="text/javascript">
- var G_Sending=false;
- //var G_Start=1;
- //------------------------------------------
- function addHandler(object,event,handler,useCapture) {
- if (object.addEventListener) {
- object.addEventListener(event,handler, useCapture ? useCapture : false)
- }
- else if (object.attachEvent) {
- object.attachEvent('on'+event,handler);
- }
- }
- //------------------------------------------define context menu position
- function defPosition(event) {
- var x=y=0;
- if (document.attachEvent!=null) {
- x = window.event.clientX +
- (document.documentElement.scrollLeft ?
- document.documentElement.scrollLeft : document.body.scrollLeft);
- y = window.event.clientY +
- (document.documentElement.scrollTop ?
- document.documentElement.scrollTop : document.body.scrollTop);
- }
- else if (!document.attachEvent && document.addEventListener) {
- x = event.clientX + window.scrollX;
- y = event.clientY + window.scrollY;
- }
- //---ftg
- return([x,y]);
- }
- //------------------------------------------popup context menu
- function conmenu(evt,el) {
- evt = evt || window.event;
- evt.cancelBubble=true;
- var menu=document.getElementById('conmenid');
- menu.innerHTML=
- '<a href="#">выделить элемент</a><br />'+
- '<a href="#">открыть страницу</a><br />';
- menu.style.left=defPosition(evt)[0]+'px';
- menu.style.top=defPosition(evt)[1]+'px';
- menu.style.display="block"
- menu.onclick=function() {
- this.style.display='none';
- }
- $(menu).find('a').eq(1).click( function() {
- popupwin = open($(el).attr('href'),'speciment','width=1000,height=500,top=50,left=50');
- });
- $(menu).find('a:first').click( function() {
- $(el).parent().parent().find('li').removeClass('active');
- $(el).parent().addClass('active');
- });
- }
- //------------------------------------------
- var Helper= {words:['treuber','zonner','annus','crane','et','us','alarm','between','then','you','found','round',
- 'like','any','other','flower','music','on','great','intro','step','trek','listening','of','hot','jar']};
- Helper.fillin=function(num,el) {
- var st='';
- for(var i=0;i<num;i++) {
- st+=this.words[Math.floor(Math.random()*25)]+' ';
- }
- el.innerHTML=st;
- }
- //------------------------------------------
- function createHTTP() {
- var r;
- try {
- r = new XMLHttpRequest();
- } catch(e) {
- try {
- r = new ActiveXObject('Msxml2.XMLHTTP');
- } catch (e) {
- r = new ActiveXObject('Microsoft.XMLHTTP');
- }
- }
- return r;
- }
- //------------------------------------------
- function ajax_request(param, f3) {
- XHR = createHTTP();
- XHR.stat=0;
- XHR.resp='';
- XHR.f3=f3;
- XHR.onreadystatechange=function() {
- if (this.readyState==4) {
- this.resp=this.responseText;
- this.stat=this.readyState;
- this.f3(this.resp);
- G_Sending=false;
- }
- else if (this.readyState==3) {
- this.stat=this.readyState;
- }
- }
- XHR.open('POST','req4.php',true);
- XHR.setRequestHeader("Content-type","application/x-www-form-urlencoded");
- XHR.send(param);
- }
- //------------------------------------------
- function send_form(f) {
- var params= 'picaddr='+encodeURIComponent(f.picaddr.value)+'&req=postform';
- G_Sending=true;
- f.subm.disabled=true;
- ajax_request(params, function (x) {$('#statusdiv').text(x);});
- setTimeout('wait_rez();',100);
- }
- //------------------------------------------
- function wait_rez() {
- if (G_Sending)
- setTimeout('wait_rez();',500)
- else {
- document.forms["goo"].subm.disabled=false;
- $('#addpic').fadeOut("slow");
- load_pics();
- }
- }
- //------------------------------------------
- function big_pic() {
- var lgpath=$(this).data('lgpath');
- var zimg=$('#bigpic img');
- zimg.attr('src',lgpath);
- //$('#bigpic').css('height',(screen.height-400)+'px');
- //$('#bigpic').css('width',(screen.width-400)+'px');
- setTimeout( function() {
- $('#bigpic').css('display','block');
- $('#bigpic').animate({opacity:1},"slow");},300);
- }
- //------------------------------------------
- function fade(el) {
- $.when($(el).animate({opacity:0},"slow")).done(
- function() {
- $(el).css('display','none');
- }
- )
- }
- //------------------------------------------Show Pictures
- function show_pics(resp) {
- if (resp=='')
- return;
- var json_resp=eval("("+resp+")");
- var picdiv = $('<div>', {'class':'picsin'});
- var img= $('<img>',{});
- for (var i=0; i<json_resp.length; i++) {
- //alert(json_resp[i]["big"]);
- var npd=picdiv.clone();
- var nimg=img.clone();
- //var img8= new Image();
- //img8.src=json_resp[i]["small"];
- //---------------------------
- //var dv=Math.sqrt(img8.width*img8.height/50000);
- // if (dv!=0)
- // nimg.attr('height',Math.floor(img8.height/dv));
- // else
- nimg.attr('height',200);
- nimg.attr('src',json_resp[i]["small"]);
- nimg.data('lgpath',json_resp[i]["big"]);
- nimg.click(big_pic);
- //---------------------------
- npd.append(nimg);
- $('#pics').append(npd);
- }
- }
- //------------------------------------------LoadPictures
- function load_pics() {
- //alert('req=showpics&start='+G_Start);
- ajax_request('req=showpics',show_pics);
- //G_Start+=10;
- }
- //-------------------------------------------RegExps
- function show_regs() {
- var el=$('#hiddregs>div').remove();
- el.appendTo('#info88');
- // Перемещаем параграф из #myDiv1 в #myDiv2
- //$('#myDiv2').append( $('#myDiv1>p') );
- //-------------------------------------list of RegExps
- ajax_request('req=showreg', function (resp) {
- //alert(resp);
- if (resp=='') {
- $('#regslist').html('empty');
- return;
- }
- var json_resp=eval('('+resp+')');
- var inhtml='<ul>';
- for (var i=0;i<json_resp.length;i++) {
- inhtml+='<li>'+json_resp[i]["reg_name"]+'</li>';
- }
- inhtml+='</ul>';
- $('#regslist').html(inhtml);
- $('#regslist li').click(function() {
- //alert($(this).html());
- $('#regslist li').removeClass("active");
- $(this).addClass("active");
- })
- })
- //----------------------directory of speciments
- ajax_request('req=showdir&inpath=../forparse/', function(resp) {
- var json_resp=eval("("+resp+")");
- //alert(json_resp.length);
- var inhtml='<ul>';
- for (var i=0;i<json_resp.length;i++) {
- inhtml+='<li><a href="'+json_resp[i]["full"]+'" target="_blank"'+
- ' title="size: '+json_resp[i]["filesize"]+'\r\n'+
- 'access: '+json_resp[i]["fileatime"]+'\r\n'+
- 'modified: '+json_resp[i]["filemtime"]+'">'+
- json_resp[i]["name"]+'</a></li>';
- }
- inhtml+='</ul>';
- $('#parseres').html(inhtml);
- $('#parseres a').on('contextmenu', function(event) {
- conmenu(event,this);
- return false;
- });
- })
- }
- //----------------------------------delete RegExps
- function delRegs() {
- ajax_request('req=delregs',function(resp) {
- $('#statusdiv').text(resp);
- show_regs();
- })
- }
- //-------------------------------------------Init
- $(document).ready(function() {
- //--------------------------------Buttons
- $('#appbutton').click(function() {
- if ($('#addpic').css('display')=='none' ) {
- var x_pos=Math.floor(screen.width/2-$('#addpic').width()/2);
- var y_pos=Math.floor(screen.height/2-$('#addpic').height()/2);
- $('#addpic').fadeIn("slow").animate({left: x_pos, top: y_pos},"slow");
- //$('#addpic').css('display','block');
- }
- else {
- $('#addpic').fadeOut("slow");
- //$('#addpic').css('display','none');
- }
- })
- //------------------------
- //$('#fuckthegod').offset().left=200;
- $('#fuckthegod').css('left',(70+$('#appbutton').offset().left)+'px')
- .css('top','-'+$('#fuckthegod').height()+'px')
- .css('background','#ff4000');
- //------------------------
- show_xml=function(resp) {
- var windiv = $('<div>',{id:"winout"});
- //resp.replace(/</g,'<').replace(/>/g,'>')
- windiv.text(resp);
- if (!document.getElementById('winout'))
- $('body').append(windiv);
- else
- windiv=$('#winout');
- var x_pos=Math.floor(screen.width/2-200);
- var y_pos=Math.floor(screen.height/2-250);
- windiv.css('display','block');
- windiv.click(function() {
- $.when($(this).animate({opacity:0},"slow")).done(
- function() {$(this).css('display','none')});
- });
- windiv.animate({left:x_pos,top:y_pos,width:400,height:500, opacity:1},"slow");
- }
- //------------------------
- $('#fuckthegod').click(function() {
- //ajax_request('req=showpicxml&start=1', show_xml);
- ajax_request('req=showpics', show_xml);
- })
- //--------------------------------------------------
- // show pics
- //--------------------------------------------------
- if (G_Action==1) {
- var bp= $('#bigpic');
- bp.css('height',(screen.height-200)+'px');
- bp.css('width',(screen.width-250)+'px');
- bp.css('left','100px');
- bp.css('top','100px');
- var rSl = new RSlider({targetId:'pics'});
- //load_pics();
- //load_pics();
- }
- //--------------------------------------------------
- // show info
- //--------------------------------------------------
- else {
- //------------------------------change submit form behavior
- var fzz=document.forms["goo"];
- if (!fzz)
- fzz=documents.forms[0];
- fzz.onsubmit=null;
- $('#addpic form[name=goo]').on('submit',{mode:555},
- function(event)
- { //alert(this.name);
- //alert(event.data.mode);
- var inval=$(this).find('input[name=picaddr]').val();
- var params='req=postreg®val='+encodeURIComponent(inval);
- G_Sending=true;
- //var inpuu=$(this).find('input[type=submit').get(0);
- //inpuu.disabled=true;
- document.forms["goo"].subm.disabled=true;
- ajax_request(params, function(x) {$('#statusdiv').text(x);});
- //---------------------------------
- wtobj= {
- counterr: 0,
- inval:'xx',
- fwait: function() {
- if (G_Sending) {
- $('#statusdiv').text('waiting...'+this.counterr);
- this.counterr++;
- setTimeout(function() {wtobj.fwait()},500);
- } else {
- document.forms["goo"].subm.disabled=false;
- $('#addpic').fadeOut("slow");
- var x=frames['statifr'];
- x.location.replace('req4.php?reqg=sesssave&arrn=regexps&value='+inval);
- show_regs();
- }
- }}
- //----------------------------------
- wtobj.inval=inval;
- setTimeout(function() {wtobj.fwait()},100);
- return false;
- });
- $('#addpic form[name=goo] legend').html('Input regular expression here');
- $('#addpic form[name=goo] label[for=picaddr]').html('RegExp');
- //--------------------------------------------------
- var popupmenu=$('<div>',{id:'conmenid'});
- $('body').append(popupmenu);
- //--------------------------------------------------
- show_regs();
- //--------------------------------------------------
- $('#statframe').html('<iframe src="req4.php" name="statifr"></iframe>');
- x=frames["statifr"];
- x.location.replace('req4.php?reqg=sessstat');
- $('#statusdiv3').html(document.cookie.replace(/;/g,'<br>'));
- }
- });
- </script>
- <body>
- <!------------------------------------------>
- <div id="hiddregs">
- <div id="cont2">
- <div id="cont1">
- <div id="regslist"></div>
- <div id="parseres"></div>
- <div id="statframe">
- </div>
- </div>
- </div>
- </div>
- <!------------------------------------------>
- <div id="addpic">
- <form name="goo" onsubmit="send_form(this);return false;" method="post" enctype="application/x-www-form-urlencoded">
- <fieldset>
- <legend>Input picture address here</legend>
- <p><label for="picaddr">Picture address </label><input type="text" name="picaddr" size="40" /></p>
- <p class="submit"><input type="submit" name="subm" value="Сохранить" /></p>
- </fieldset>
- </form>
- </div>
- <!----------------------------------------->
- <div id="bigpic" onclick="fade(this);">
- <div id="bigpicin">
- </div>
- </div>
- <div id="allcontent">
- <div id="header">
- <div class="button" id="appbutton">добавить</div>
- <div class="button" id="fuckthegod">xml</div>
- <div id="headerlinks">
- <a href="#" onclick="
- if ($(this).parent().height()==14)
- $(this).parent().animate({height:200},'slow');
- else
- $(this).parent().animate({height:14},'slow');
- return false;"
- style="margin-bottom:15px;font-weight:bold;">
- Extra</a>
- <a href="req4.php?reqg=testplain" target="_blank">test plain</a>
- <a href="#"
- onclick="frames['statifr'].location.replace
- ('req4.php?reqg=autosubmit');return false;">
- auto submit</a>
- <a href="#"
- onclick="frames['statifr'].location.replace('req4.php?reqg=sessclear');return false;">
- clear session
- </a>
- <a href="#" onclick="delRegs();return false;">Delete RegExps</a>
- <a href="#"
- onclick="frames['statifr'].location.replace('req4.php?reqg=encodes');return false;">
- encoding examples
- </a>
- <a href="#"
- onclick="frames['statifr'].location.replace('req4.php?reqg=showlog');return false;">
- show logfile
- </a>
- <a href="#"
- onclick="frames['statifr'].location.replace('req4.php?reqg=checkstr');return false;">
- check string
- </a>
- </div>
- </div>
- <div id="pics">
- </div>
- <div id="info88">
- </div>
- <div id="footer">
- <div id="statusdiv"></div>
- <div id="statusdiv3"></div>
- <div class="hidden_block">
- <?php
- //------------------------total renew cache
- $dir=opendir('small');
- while ($name=readdir($dir)) {
- if (($name!='.') && ($name!='..')) {
- if (is_file('small/'.$name)) {
- echo '<img src="small/'.$name.'" />';
- }
- }
- }
- closedir($dir);
- ?>
- </div>
- </div>
- </div>
- </body>
- </html>
Add Comment
Please, Sign In to add comment