3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Template Name: Q&A */ get_header(); ?> <?php require_once('db_connect.php'); $userIDmarker = $_SESSION['userID']; ?> <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.validationEngine-en.js"></script> <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.validationEngine.js"></script> <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/css/validationEngine.jquery.css"> <script type="text/javascript"> function validateForm() { var x=document.forms["form1"]["Category"].value; if (x==null || x=="#") { alert("You must select a Category."); return false; } } jQuery(document).ready(function(){ jQuery("#form1").validationEngine('attach', {promptPosition : "topRight"}); jQuery(".deleteQuestion").click(function(){ var x = confirm("Are you sure want to delete this question?"); if(x){ var question_id = jQuery(this).attr('rel'); jQuery.ajax({ url:"<?php bloginfo("stylesheet_directory");?>/ajax.php?action=deleteQuestion", data:{question_id:question_id}, type:"POST", success:function(response){ if(response>0) jQuery("#box_"+question_id).remove(); } }); } }); jQuery(".deleteAns").click(function(){ var x = confirm("Are you sure want to delete this answer?"); if(x){ var answer_id = jQuery(this).attr('rel'); jQuery.ajax({ url:"<?php bloginfo("stylesheet_directory");?>/ajax.php?action=deleteAnswer", data:{answer_id:answer_id}, type:"POST", success:function(response){ if(response>0) jQuery("#answer_"+answer_id).remove(); } }); } }); $(".summary").keyup(function() { var len = jQuery(this).val().length; var max = 300; var left = 0; if (len <= max) { left = max - len; jQuery(this).siblings('.character_count').html("You have characters <span>" + left + "</span> left"); } }); $("#question_div").keyup(function() { var len = jQuery(this).val().length; var max = 140; var left = 0; if (len <= max) { left = max - len; jQuery('#character_count_question').html("You have characters <span>" + left + "</span> left"); } }); //document.write('<style type="text/css">input.styled { display: block; }</style>'); }); </script> <style> /* .character_count { margin-top: 17px !important; padding: 2px; } */ .character_count > span { color: red; } .character_count { float: right; margin-top: 4px; } #character_count_question { margin-right: 149px; margin-top: -11px; } </style> <?php if (isset($_POST['add'])) { if(!empty($_POST['hsecond_category'])) $level = $_POST['hsecond_category']; else $level = $_POST['Category']; $question = $_POST['singleQuestionContent']; $sqlCategory = "SELECT name from projectcategory WHERE catid = '$level'"; $resultCat = mysql_query($sqlCategory); $row = mysql_fetch_row($resultCat); $catName = $row[0]; $sql="INSERT INTO questions (Question, AuthorUserID, Category ) VALUES ('$question', '$userIDmarker','$catName');"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } else{ ?> <script> jQuery(document).ready(function(){ $('.darken').show(); show_permisson_project(); }); </script> <?php } } /* if (isset($_POST['upcomment']) && $_POST['Answer'] != "") { if ($_POST['currentcomment'] == "") { $updatedcomment = $_POST['Answer']. "^"; } else { $updatedcomment = $_POST['currentcomment'] . "^" . $_POST['Answer']; } $sql="UPDATE questions SET Answers='$updatedcomment' WHERE id = '$_POST[qid]'"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "<div class='updated'><p><strong>Updated!</strong> - Your comment has been added</p></div>"; } */ if(isset($_POST['submitAnswer'])){ $question_id = $_POST['qid']; $answer = $_POST['Answer']; $user_id = $_SESSION['userID']; $date = date('Y-m-d H:i:s',time()); $sql2 = "SELECT Question,AuthorUserID FROM questions WHERE id=$question_id"; $result2 = mysql_query($sql2); $data2 = mysql_fetch_assoc($result2); $question_title = $data2["Question"]; $sql = "SELECT EmailAddress FROM user WHERE UserID=".$data2['AuthorUserID']; $result = mysql_query($sql); $data = mysql_fetch_assoc($result); $authorEmail = $data["EmailAddress"]; $query = "INSERT INTO `qa_answers` " . "(`question_id`, `user_id`, `answer`, `date`, `status`) " . "VALUES ('$question_id', '$user_id', '$answer', '$date', '1');"; mysql_query($query); // multiple recipients $to = $authorEmail; //$to = "gilbert@123789.org"; // subject $subject = 'New answers posted'; $message = '<p>Dear User,<p><p>New comment posted on the <b><i>"'.$question_title.'"</i></b></p>'; $message .= '<p>Please click the link below to review.<br/> <a href="'.get_bloginfo("url").'/qa#box_'.$question_id.'">Click here</a>'; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: Hugyourhouse <amer@hugyourhouse.co.uk>' . "\r\n"; mail($to, $subject, $message, $headers); echo "<div class='updated'><p><strong>Updated!</strong> - Your comment has been added</p></div>"; } ?> <div id="inner_content"> <div class="page_content"> <h2 class="title"><?php the_title(); ?></h2> <?php if(!isset($_SESSION['username'])) { ?> <h5 style="float: right;margin: -57px 0 0 0;"><a class='footer_login' href='#login_wrap' >Login</a> today to ask your question</h5> <?php }?> <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> <?php the_content(); ?> <?php endwhile; ?> <?php if(isset($_SESSION['username'])) { ?> <div class="questionaskBox"> <form id="form1" name="form1" method="post" action="" onsubmit="return validateForm();"> <h5>Ask your question today by entering it in the box below</h5> <p><strong>Step 1:</strong> Choose your Category</p> <p style="float: left;width: 621px;"> <select name="Category" id="qmain_category" class="art-select validate[required]" style=" " > <option value="">Select primary category</option> <option value="2">Build</option> <option value="3">Decor</option> <option value="4">Indoor</option> <option value="5">Outdoor</option> <option value="6">Go Green</option> </select> </p> <p style="float: left;width: 621px;"> <select name="hsecond_category" class="art-select validate[required]" id="qsecond_category"> <option value="">Select sub category</option> </select> </p> <p><strong>Step 2:</strong> Ask your Question</p> <p> <textarea name="singleQuestionContent" class="validate[required]" cols="60" rows="5" id="question_div" maxlength="140"></textarea> <div class="character_count" id="character_count_question">You have characters <span>140</span> left</div></p> <input name="add" type="hidden" value="add" /> <input name="Ask your Question" type="submit" value="Submit Question" class="buttonStyleAdd" style="float: left; margin-top: -32px;" id="qsubmit"/> </form> </div> <?php } ?> <?php if (isset($_GET['cat'])) {$questioninfo = mysql_query("SELECT * FROM questions WHERE Category = '$_GET[cat]'");} else {$questioninfo = mysql_query("SELECT * FROM questions order by id desc");} while( $row = mysql_fetch_array( $questioninfo ) ){ ?> <div class="questionBox" id="box_<?php echo $row['id'];?>"> <a name="box_<?php echo $row['id'];?>"></a> <script type="text/javascript"> $('#seeanswers<?php echo $row['id']; ?>').click(function(){ $('#hiddenComments<?php echo $row['id']; ?>').toggle(); }); $('#giveanswer<?php echo $row['id']; ?>').click(function(){ $('#giveanswerBox<?php echo $row['id']; ?>').toggle(); }); </script> <h2><?php echo $row['Question']; ?></h2> <?php $sql2 = "SELECT AuthorUserID FROM questions WHERE id=".$row['id']; $result2 = mysql_query($sql2); $data2 = mysql_fetch_assoc($result2); $AuthorUserID = $data2["AuthorUserID"]; if($AuthorUserID==$userIDmarker || $_SESSION['type']==5){ ?> <a title="Delete this question" rel="<?php echo $row['id'];?>" class="delete deleteQuestion" href="javascript:void(0);" style="float: right; margin-top: -38px;">Delete</a> <?php }?> <p>Category: <?php echo $row['Category']; ?> | Posted By <?php $userInfo = mysql_query("SELECT * FROM user WHERE UserID = '$row[AuthorUserID]' LIMIT 1"); while( $userdata = mysql_fetch_array( $userInfo ) ){echo $userdata['FirstName']." ".$userdata['LastName'];}?> </a></p> <a id="seeanswers<?php echo $row['id']; ?>" onclick="showorhide('hiddenComments<?php echo $row['id']; ?>')">See Answers</a> or <a id="giveanswer<?php echo $row['id']; ?>" onclick="showorhide('giveanswerBox<?php echo $row['id']; ?>')">Answer this Question</a> <div class="hiddenComments" id="hiddenComments<?php echo $row['id']; ?>"> <?php /*$answer = explode('^', $row['Answers']); $answercounter = 0; while ( $answercounter < 10) { if ($answer[$answercounter]) { echo "<li>".$answer[$answercounter]."</li>"; } if ($answer[$answercounter]== "") {$answercounter = 15;} else { $answercounter++;} } */?> <?php $ansQuery = "SELECT * FROM qa_answers WHERE question_id= ".$row['id']; $resultAns = mysql_query($ansQuery); while($ans = mysql_fetch_assoc( $resultAns )){ $sqlUser = "SELECT FirstName,UserID FROM user WHERE UserID=".$ans['user_id']; $resultUser = mysql_query($sqlUser); $dataUser = mysql_fetch_assoc($resultUser); $name = $dataUser["FirstName"]; $ID = $dataUser["UserID"]; echo "<li id='answer_".$ans['ID']."'>".$ans["answer"]."<br/><small>".date('Y-m-d',strtotime($ans["date"]))."<small> By <a href='".get_bloginfo('url')."/user-profile/?userID=$ID'>$name</a>"; if($ans['user_id']==$userIDmarker || $AuthorUserID==$userIDmarker || $_SESSION['type']==5){ echo "<a class='delete deleteAns' href='javascript:void(0);' rel='".$ans['ID']."' style='float:right;'>Delete</a>"; } echo "</li>"; } ?> </div> <div class="giveanswerBox" id="giveanswerBox<?php echo $row['id']; ?>"> <?php if(isset($_SESSION['username'])) { ?> <form id="form2" name="form2" method="post" action=""> <div class="answerCon"> <textarea name="Answer" cols="60" rows="5" class="summary" style="text-align: left;width:600px !important; float:left !important; background-color:#fff !important; height:200px;" maxlength="300"></textarea> <div class="character_count">You have characters <span>300</span> left</div> <br /><br /><br /> </div> <!-- <input name="currentcomment" type="hidden" value="<?php echo $row['Answers']; ?>" /> <input name="qid" type="hidden" value="<?php echo $row['id']; ?>" /><input name="upcomment" type="hidden" value="yes" />--> <!-- <input name="Ask your Question" type="submit" value="Submit answer" class="buttonStyleAdd" style="float: left; margin-top: -32px;"/>--> <input name="qid" type="hidden" value="<?php echo $row['id']; ?>" /> <input name="author_id" type="hidden" value="<?php echo $row['AuthorUserID ']; ?>" /> <input name="submitAnswer" type="submit" value="Submit answer" class="buttonStyleAdd" style="float: left; margin-top: -32px;"/> </form> <? } else { echo "<br/><h5><a class='footer_login' href='#login_wrap'>Login</a> today to answer this question</h5>"; }?> </div> </div> <div class="clear"></div><!--clear--> <?php }?> </div><!--page_content--> <div id="sidebar"> <h3 class="widgettitle">Latest Questions & Answers by Category</h3> <ul id="category_list"> <li><a href="?cat=Build">Build</a></li> <li><a href="?cat=Decor">Decor</a></li> <li><a href="?cat=Indoor">Indoor</a></li> <li><a href="?cat=Outdoor">Outdoor</a></li> <li><a href="?cat=Go Green">Go Green</a></li> </ul> <div class="advert"> <p><small>SPONSORED ADVERT</small></p> <div class="advert_image"> <?php if (function_exists('dfrads')) { echo dfrads('1961087'); } ?> </div><!--advert_image--> </div><!--advert--> </div><!--sidebar--> <div class="clear"></div><!--clear--> </div><!--inner_content--> <div id="question_post" style="z-index:99999999;display:none;"> <div class="not_now"> <a href="#" onclick="hide_permisson_project(); return false;">Close</a> </div> <div class="sep"></div> <h2>Your question has been posted successfully.</h2> <div class="sep"></div> </div> <script> function hide_permisson_project() { $('#question_post').hide(); $('.darken').hide(); } function show_permisson_project() { $('.darken').show(); $('#question_post').show(); } </script> <?php get_footer(); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 78
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 34, Position 2 = 38
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
2 jumps found. (Code = 43) Position 1 = 72, Position 2 = 77
Branch analysis from position: 72
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 77
2 jumps found. (Code = 43) Position 1 = 81, Position 2 = 160
Branch analysis from position: 81
2 jumps found. (Code = 43) Position 1 = 168, Position 2 = 169
Branch analysis from position: 168
2 jumps found. (Code = 43) Position 1 = 173, Position 2 = 183
Branch analysis from position: 173
1 jumps found. (Code = 42) Position 1 = 180
Branch analysis from position: 180
2 jumps found. (Code = 44) Position 1 = 183, Position 2 = 174
Branch analysis from position: 183
2 jumps found. (Code = 43) Position 1 = 187, Position 2 = 188
Branch analysis from position: 187
2 jumps found. (Code = 43) Position 1 = 192, Position 2 = 202
Branch analysis from position: 192
1 jumps found. (Code = 42) Position 1 = 206
Branch analysis from position: 206
1 jumps found. (Code = 42) Position 1 = 387
Branch analysis from position: 387
2 jumps found. (Code = 44) Position 1 = 392, Position 2 = 207
Branch analysis from position: 392
2 jumps found. (Code = 43) Position 1 = 397, Position 2 = 401
Branch analysis from position: 397
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 401
Branch analysis from position: 207
2 jumps found. (Code = 47) Position 1 = 244, Position 2 = 248
Branch analysis from position: 244
2 jumps found. (Code = 43) Position 1 = 249, Position 2 = 253
Branch analysis from position: 249
1 jumps found. (Code = 42) Position 1 = 271
Branch analysis from position: 271
2 jumps found. (Code = 44) Position 1 = 276, Position 2 = 266
Branch analysis from position: 276
1 jumps found. (Code = 42) Position 1 = 359
Branch analysis from position: 359
2 jumps found. (Code = 44) Position 1 = 364, Position 2 = 301
Branch analysis from position: 364
2 jumps found. (Code = 43) Position 1 = 371, Position 2 = 385
Branch analysis from position: 371
1 jumps found. (Code = 42) Position 1 = 386
Branch analysis from position: 386
2 jumps found. (Code = 44) Position 1 = 392, Position 2 = 207
Branch analysis from position: 392
Branch analysis from position: 207
Branch analysis from position: 385
2 jumps found. (Code = 44) Position 1 = 392, Position 2 = 207
Branch analysis from position: 392
Branch analysis from position: 207
Branch analysis from position: 301
2 jumps found. (Code = 47) Position 1 = 346, Position 2 = 348
Branch analysis from position: 346
2 jumps found. (Code = 47) Position 1 = 349, Position 2 = 353
Branch analysis from position: 349
2 jumps found. (Code = 43) Position 1 = 354, Position 2 = 358
Branch analysis from position: 354
2 jumps found. (Code = 44) Position 1 = 364, Position 2 = 301
Branch analysis from position: 364
Branch analysis from position: 301
Branch analysis from position: 358
Branch analysis from position: 353
Branch analysis from position: 348
Branch analysis from position: 266
2 jumps found. (Code = 44) Position 1 = 276, Position 2 = 266
Branch analysis from position: 276
Branch analysis from position: 266
Branch analysis from position: 253
Branch analysis from position: 248
Branch analysis from position: 202
1 jumps found. (Code = 42) Position 1 = 387
Branch analysis from position: 387
Branch analysis from position: 188
Branch analysis from position: 174
2 jumps found. (Code = 44) Position 1 = 183, Position 2 = 174
Branch analysis from position: 183
Branch analysis from position: 174
Branch analysis from position: 183
Branch analysis from position: 169
Branch analysis from position: 160
Branch analysis from position: 38
2 jumps found. (Code = 43) Position 1 = 72, Position 2 = 77
Branch analysis from position: 72
Branch analysis from position: 77
Branch analysis from position: 78
filename:       /in/B2oBW
function name:  (null)
number of ops:  405
compiled vars:  !0 = $userIDmarker, !1 = $level, !2 = $question, !3 = $sqlCategory, !4 = $resultCat, !5 = $row, !6 = $catName, !7 = $sql, !8 = $con, !9 = $question_id, !10 = $answer, !11 = $user_id, !12 = $date, !13 = $sql2, !14 = $result2, !15 = $data2, !16 = $question_title, !17 = $result, !18 = $data, !19 = $authorEmail, !20 = $query, !21 = $to, !22 = $subject, !23 = $message, !24 = $headers, !25 = $questioninfo, !26 = $AuthorUserID, !27 = $userInfo, !28 = $userdata, !29 = $ansQuery, !30 = $resultAns, !31 = $sqlUser, !32 = $ans, !33 = $resultUser, !34 = $dataUser, !35 = $name, !36 = $ID
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL_BY_NAME                                       'get_header'
          1        DO_FCALL                                      0          
    7     2        INCLUDE_OR_EVAL                                          'db_connect.php', REQUIRE_ONCE
    8     3        FETCH_R                      global              ~39     '_SESSION'
          4        FETCH_DIM_R                                      ~40     ~39, 'userID'
          5        ASSIGN                                                   !0, ~40
   10     6        ECHO                                                     '%3Cscript+type%3D%22text%2Fjavascript%22+src%3D%22'
          7        INIT_FCALL_BY_NAME                                       'bloginfo'
          8        SEND_VAL_EX                                              'template_url'
          9        DO_FCALL                                      0          
         10        ECHO                                                     '%2Fjs%2Fjquery.validationEngine-en.js%22%3E%3C%2Fscript%3E%0A%3Cscript+type%3D%22text%2Fjavascript%22+src%3D%22'
   11    11        INIT_FCALL_BY_NAME                                       'bloginfo'
         12        SEND_VAL_EX                                              'template_url'
         13        DO_FCALL                                      0          
         14        ECHO                                                     '%2Fjs%2Fjquery.validationEngine.js%22%3E%3C%2Fscript%3E%0A%3Clink+rel%3D%22stylesheet%22+href%3D%22'
   12    15        INIT_FCALL_BY_NAME                                       'bloginfo'
         16        SEND_VAL_EX                                              'template_url'
         17        DO_FCALL                                      0          
         18        ECHO                                                     '%2Fcss%2FvalidationEngine.jquery.css%22%3E%0A%0A%3Cscript+type%3D%22text%2Fjavascript%22%3E%0Afunction+validateForm%28%29%0A%7B%0Avar+x%3Ddocument.forms%5B%22form1%22%5D%5B%22Category%22%5D.value%3B%0Aif+%28x%3D%3Dnull+%7C%7C+x%3D%3D%22%23%22%29%0A++%7B%0A++alert%28%22You+must+select+a+Category.%22%29%3B%0A++return+false%3B%0A%7D%0A%7D%0A%0AjQuery%28document%29.ready%28function%28%29%7B%0A++++%0A%09jQuery%28%22%23form1%22%29.validationEngine%28%27attach%27%2C+%7BpromptPosition+%3A++%22topRight%22%7D%29%3B%0A++++++++%0A++++++++jQuery%28%22.deleteQuestion%22%29.click%28function%28%29%7B%0A+++++++++++var+x++++++++++++%3D+++confirm%28%22Are+you+sure+want+to+delete+this+question%3F%22%29%3B%0A+++++++++++if%28x%29%7B%0A++++++++++++var+question_id++%3D+++jQuery%28this%29.attr%28%27rel%27%29%3B%0A+++++++++++jQuery.ajax%28%7B++++%0A%0A++++++++++++++++url%3A%22'
   35    19        INIT_FCALL_BY_NAME                                       'bloginfo'
         20        SEND_VAL_EX                                              'stylesheet_directory'
         21        DO_FCALL                                      0          
         22        ECHO                                                     '%2Fajax.php%3Faction%3DdeleteQuestion%22%2C%0A++++++++++++++++data%3A%7Bquestion_id%3Aquestion_id%7D%2C%0A++++++++++++++++type%3A%22POST%22%2C%0A++++++++++++++++success%3Afunction%28response%29%7B%0A++++++++++++++++++++++if%28response%3E0%29%0A+++++++++++++++++++++jQuery%28%22%23box_%22%2Bquestion_id%29.remove%28%29%3B%0A++++++++++++++++%7D%0A%0A+++++++++++++%7D%29%3B%0A++++++++++++%7D%0A+++++++++++++++++++++++%0A++++++++%7D%29%3B%0A++++++++jQuery%28%22.deleteAns%22%29.click%28function%28%29%7B%0A+++++++++++var+x++++++++++++%3D+++confirm%28%22Are+you+sure+want+to+delete+this+answer%3F%22%29%3B%0A+++++++++++if%28x%29%7B%0A++++++++++++var+answer_id+++%3D+++jQuery%28this%29.attr%28%27rel%27%29%3B%0A+++++++++++jQuery.ajax%28%7B++++%0A%0A++++++++++++++++url%3A%22'
   53    23        INIT_FCALL_BY_NAME                                       'bloginfo'
         24        SEND_VAL_EX                                              'stylesheet_directory'
         25        DO_FCALL                                      0          
         26        ECHO                                                     '%2Fajax.php%3Faction%3DdeleteAnswer%22%2C%0A++++++++++++++++data%3A%7Banswer_id%3Aanswer_id%7D%2C%0A++++++++++++++++type%3A%22POST%22%2C%0A++++++++++++++++success%3Afunction%28response%29%7B%0A++++++++++++++++++++++if%28response%3E0%29%0A+++++++++++++++++++++jQuery%28%22%23answer_%22%2Banswer_id%29.remove%28%29%3B%0A++++++++++++++++%7D%0A+++++++++++++%7D%29%3B%0A++++++++++++%7D%0A+++++++++++++++++++++++%0A++++++++%7D%29%3B%0A++++++++%0A+++++++%24%28%22.summary%22%29.keyup%28function%28%29+%7B%0A++++++++++++var+len+%3D+jQuery%28this%29.val%28%29.length%3B%0A++++++++++++var+max+%3D+300%3B%0A++++++++++++var+left+%3D+0%3B%0A++++++++++++if+%28len+%3C%3D+max%29+%7B%0A++++++++++++++++left+%3D+max+-+len%3B%0A++++++++++++++++jQuery%28this%29.siblings%28%27.character_count%27%29.html%28%22You+have+characters+%3Cspan%3E%22+%2B+left+%2B+%22%3C%2Fspan%3E+left%22%29%3B%0A%0A++++++++++++%7D%0A++++++++%7D%29%3B+%0A++++++++%24%28%22%23question_div%22%29.keyup%28function%28%29+%7B%0A++++++++++++var+len+%3D+jQuery%28this%29.val%28%29.length%3B%0A++++++++++++var+max+%3D+140%3B%0A++++++++++++var+left+%3D+0%3B%0A++++++++++++if+%28len+%3C%3D+max%29+%7B%0A++++++++++++++++left+%3D+max+-+len%3B%0A++++++++++++++++jQuery%28%27%23character_count_question%27%29.html%28%22You+have+characters+%3Cspan%3E%22+%2B+left+%2B+%22%3C%2Fspan%3E+left%22%29%3B%0A%0A++++++++++++%7D%0A++++++++%7D%29%3B+%0A++++++++%0A++++++++%0A%09%2F%2Fdocument.write%28%27%3Cstyle+type%3D%22text%2Fcss%22%3Einput.styled+%7B+display%3A+block%3B+%7D%3C%2Fstyle%3E%27%29%3B%0A%7D%29%3B%0A%3C%2Fscript%3E%0A%3Cstyle%3E%0A%2F%2A+%0A.character_count+%7B%0A+margin-top%3A+17px+%21important%3B%0A+padding%3A+2px%3B%0A%7D%0A%2A%2F%0A%0A.character_count+%3E+span+%7B%0A++++color%3A+red%3B%0A%7D%0A%0A%0A.character_count+%7B%0A++++float%3A+right%3B%0A++++margin-top%3A+4px%3B%0A%7D%0A%23character_count_question+%7B%0A++++margin-right%3A+149px%3B%0A++++margin-top%3A+-11px%3B%0A%7D%0A%0A%3C%2Fstyle%3E%0A'
  115    27        FETCH_IS                                         ~47     '_POST'
         28        ISSET_ISEMPTY_DIM_OBJ                         0          ~47, 'add'
         29      > JMPZ                                                     ~48, ->78
  117    30    >   FETCH_IS                                         ~49     '_POST'
         31        ISSET_ISEMPTY_DIM_OBJ                         1  ~50     ~49, 'hsecond_category'
         32        BOOL_NOT                                         ~51     ~50
         33      > JMPZ                                                     ~51, ->38
  118    34    >   FETCH_R                      global              ~52     '_POST'
         35        FETCH_DIM_R                                      ~53     ~52, 'hsecond_category'
         36        ASSIGN                                                   !1, ~53
         37      > JMP                                                      ->41
  120    38    >   FETCH_R                      global              ~55     '_POST'
         39        FETCH_DIM_R                                      ~56     ~55, 'Category'
         40        ASSIGN                                                   !1, ~56
  122    41    >   FETCH_R                      global              ~58     '_POST'
         42        FETCH_DIM_R                                      ~59     ~58, 'singleQuestionContent'
         43        ASSIGN                                                   !2, ~59
  123    44        ROPE_INIT                                     3  ~62     'SELECT+name+from+projectcategory+WHERE+catid+%3D+%27'
         45        ROPE_ADD                                      1  ~62     ~62, !1
         46        ROPE_END                                      2  ~61     ~62, '%27'
         47        ASSIGN                                                   !3, ~61
  124    48        INIT_FCALL_BY_NAME                                       'mysql_query'
         49        SEND_VAR_EX                                              !3
         50        DO_FCALL                                      0  $65     
         51        ASSIGN                                                   !4, $65
  125    52        INIT_FCALL_BY_NAME                                       'mysql_fetch_row'
         53        SEND_VAR_EX                                              !4
         54        DO_FCALL                                      0  $67     
         55        ASSIGN                                                   !5, $67
  126    56        FETCH_DIM_R                                      ~69     !5, 0
         57        ASSIGN                                                   !6, ~69
  128    58        ROPE_INIT                                     7  ~72     'INSERT+INTO+questions+%28Question%2C+AuthorUserID%2C+Category+%29%0AVALUES+%28%27'
  129    59        ROPE_ADD                                      1  ~72     ~72, !2
         60        ROPE_ADD                                      2  ~72     ~72, '%27%2C+%27'
         61        ROPE_ADD                                      3  ~72     ~72, !0
         62        ROPE_ADD                                      4  ~72     ~72, '%27%2C%27'
         63        ROPE_ADD                                      5  ~72     ~72, !6
         64        ROPE_END                                      6  ~71     ~72, '%27%29%3B'
  128    65        ASSIGN                                                   !7, ~71
  131    66        INIT_FCALL_BY_NAME                                       'mysql_query'
         67        SEND_VAR_EX                                              !7
         68        SEND_VAR_EX                                              !8
         69        DO_FCALL                                      0  $77     
         70        BOOL_NOT                                         ~78     $77
         71      > JMPZ                                                     ~78, ->77
  133    72    >   INIT_FCALL_BY_NAME                                       'mysql_error'
         73        DO_FCALL                                      0  $79     
         74        CONCAT                                           ~80     'Error%3A+', $79
         75      > EXIT                                                     ~80
         76*       JMP                                                      ->78
  137    77    >   ECHO                                                     '%3Cscript%3E%0A++jQuery%28document%29.ready%28function%28%29%7B%0A++++++%24%28%27.darken%27%29.show%28%29%3B%0A+++++++show_permisson_project%28%29%3B%0A++++++++%0A+++%7D%29%3B%0A%3C%2Fscript%3E%0A++'
  165    78    >   FETCH_IS                                         ~81     '_POST'
         79        ISSET_ISEMPTY_DIM_OBJ                         0          ~81, 'submitAnswer'
         80      > JMPZ                                                     ~82, ->160
  167    81    >   FETCH_R                      global              ~83     '_POST'
         82        FETCH_DIM_R                                      ~84     ~83, 'qid'
         83        ASSIGN                                                   !9, ~84
  168    84        FETCH_R                      global              ~86     '_POST'
         85        FETCH_DIM_R                                      ~87     ~86, 'Answer'
         86        ASSIGN                                                   !10, ~87
  169    87        FETCH_R                      global              ~89     '_SESSION'
         88        FETCH_DIM_R                                      ~90     ~89, 'userID'
         89        ASSIGN                                                   !11, ~90
  170    90        INIT_FCALL                                               'date'
         91        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
         92        INIT_FCALL                                               'time'
         93        DO_ICALL                                         $92     
         94        SEND_VAR                                                 $92
         95        DO_ICALL                                         $93     
         96        ASSIGN                                                   !12, $93
  171    97        NOP                                                      
         98        FAST_CONCAT                                      ~95     'SELECT+Question%2CAuthorUserID+FROM+questions+WHERE+id%3D', !9
         99        ASSIGN                                                   !13, ~95
  172   100        INIT_FCALL_BY_NAME                                       'mysql_query'
        101        SEND_VAR_EX                                              !13
        102        DO_FCALL                                      0  $97     
        103        ASSIGN                                                   !14, $97
  173   104        INIT_FCALL_BY_NAME                                       'mysql_fetch_assoc'
        105        SEND_VAR_EX                                              !14
        106        DO_FCALL                                      0  $99     
        107        ASSIGN                                                   !15, $99
  174   108        FETCH_DIM_R                                      ~101    !15, 'Question'
        109        ASSIGN                                                   !16, ~101
  176   110        FETCH_DIM_R                                      ~103    !15, 'AuthorUserID'
        111        CONCAT                                           ~104    'SELECT+EmailAddress+FROM+user+WHERE+UserID%3D', ~103
        112        ASSIGN                                                   !7, ~104
  177   113        INIT_FCALL_BY_NAME                                       'mysql_query'
        114        SEND_VAR_EX                                              !7
        115        DO_FCALL                                      0  $106    
        116        ASSIGN                                                   !17, $106
  178   117        INIT_FCALL_BY_NAME                                       'mysql_fetch_assoc'
        118        SEND_VAR_EX                                              !17
        119        DO_FCALL                                      0  $108    
        120        ASSIGN                                                   !18, $108
  179   121        FETCH_DIM_R                                      ~110    !18, 'EmailAddress'
        122        ASSIGN                                                   !19, ~110
  185   123        ROPE_INIT                                     9  ~113    'VALUES+%28%27'
        124        ROPE_ADD                                      1  ~113    ~113, !9
        125        ROPE_ADD                                      2  ~113    ~113, '%27%2C+%27'
        126        ROPE_ADD                                      3  ~113    ~113, !11
        127        ROPE_ADD                                      4  ~113    ~113, '%27%2C+%27'
        128        ROPE_ADD                                      5  ~113    ~113, !10
        129        ROPE_ADD                                      6  ~113    ~113, '%27%2C+%27'
        130        ROPE_ADD                                      7  ~113    ~113, !12
        131        ROPE_END                                      8  ~112    ~113, '%27%2C+%271%27%29%3B'
        132        CONCAT                                           ~118    'INSERT+INTO+%60qa_answers%60+%28%60question_id%60%2C+%60user_id%60%2C+%60answer%60%2C+%60date%60%2C+%60status%60%29+', ~112
  183   133        ASSIGN                                                   !20, ~118
  186   134        INIT_FCALL_BY_NAME                                       'mysql_query'
        135        SEND_VAR_EX                                              !20
        136        DO_FCALL                                      0          
  189   137        ASSIGN                                                   !21, !19
  192   138        ASSIGN                                                   !22, 'New+answers+posted'
  194   139        CONCAT                                           ~123    '%3Cp%3EDear+User%2C%3Cp%3E%3Cp%3ENew+comment+posted+on+the+%3Cb%3E%3Ci%3E%22', !16
        140        CONCAT                                           ~124    ~123, '%22%3C%2Fi%3E%3C%2Fb%3E%3C%2Fp%3E'
        141        ASSIGN                                                   !23, ~124
  195   142        INIT_FCALL_BY_NAME                                       'get_bloginfo'
        143        SEND_VAL_EX                                              'url'
        144        DO_FCALL                                      0  $126    
        145        CONCAT                                           ~127    '%3Cp%3EPlease+click+the+link+below+to+review.%3Cbr%2F%3E+%3Ca+href%3D%22', $126
        146        CONCAT                                           ~128    ~127, '%2Fqa%23box_'
        147        CONCAT                                           ~129    ~128, !9
        148        CONCAT                                           ~130    ~129, '%22%3EClick+here%3C%2Fa%3E'
        149        ASSIGN_OP                                     8          !23, ~130
  196   150        ASSIGN                                                   !24, 'MIME-Version%3A+1.0%0D%0A'
  197   151        ASSIGN_OP                                     8          !24, 'Content-type%3A+text%2Fhtml%3B+charset%3Diso-8859-1%0D%0A'
  198   152        ASSIGN_OP                                     8          !24, 'From%3A+Hugyourhouse+%3Camer%40hugyourhouse.co.uk%3E%0D%0A'
  199   153        INIT_FCALL                                               'mail'
        154        SEND_VAR                                                 !21
        155        SEND_VAR                                                 !22
        156        SEND_VAR                                                 !23
        157        SEND_VAR                                                 !24
        158        DO_ICALL                                                 
  201   159        ECHO                                                     '%3Cdiv+class%3D%27updated%27%3E%3Cp%3E%3Cstrong%3EUpdated%21%3C%2Fstrong%3E+-+Your+comment+has+been+added%3C%2Fp%3E%3C%2Fdiv%3E'
  206   160    >   ECHO                                                     '++%0A%09%3Cdiv+id%3D%22inner_content%22%3E%0A++++%0A++++%3Cdiv+class%3D%22page_content%22%3E%0A++++%0A++++%0A++++++++++++++++%0A+++++++++++%3Ch2+class%3D%22title%22%3E'
  213   161        INIT_FCALL_BY_NAME                                       'the_title'
        162        DO_FCALL                                      0          
        163        ECHO                                                     '%3C%2Fh2%3E%0A%09%09+++'
  214   164        FETCH_IS                                         ~137    '_SESSION'
        165        ISSET_ISEMPTY_DIM_OBJ                         0  ~138    ~137, 'username'
        166        BOOL_NOT                                         ~139    ~138
        167      > JMPZ                                                     ~139, ->169
  215   168    >   ECHO                                                     '%09%09+++%3Ch5+style%3D%22float%3A+right%3Bmargin%3A+-57px+0+0+0%3B%22%3E%3Ca+class%3D%27footer_login%27+href%3D%27%23login_wrap%27+%3ELogin%3C%2Fa%3E+today+to+ask+your+question%3C%2Fh5%3E%0A%09%09+++'
  217   169    >   ECHO                                                     '++++++++++++'
        170        INIT_FCALL_BY_NAME                                       'have_posts'
        171        DO_FCALL                                      0  $140    
        172      > JMPZ                                                     $140, ->183
        173    > > JMP                                                      ->180
        174    >   INIT_FCALL_BY_NAME                                       'the_post'
        175        DO_FCALL                                      0          
  218   176        ECHO                                                     '++++++++++++++++'
        177        INIT_FCALL_BY_NAME                                       'the_content'
        178        DO_FCALL                                      0          
  219   179        ECHO                                                     '++++++++++++'
  217   180    >   INIT_FCALL_BY_NAME                                       'have_posts'
        181        DO_FCALL                                      0  $143    
        182      > JMPNZ                                                    $143, ->174
  220   183    >   ECHO                                                     '%09%09%09+'
        184        FETCH_IS                                         ~144    '_SESSION'
        185        ISSET_ISEMPTY_DIM_OBJ                         0          ~144, 'username'
        186      > JMPZ                                                     ~145, ->188
  221   187    >   ECHO                                                     '%09%09++%0A%09%09++%3Cdiv+class%3D%22questionaskBox%22%3E%0A++++++++++%3Cform+id%3D%22form1%22+name%3D%22form1%22+method%3D%22post%22+action%3D%22%22+onsubmit%3D%22return+validateForm%28%29%3B%22%3E%0A++++++++++%3Ch5%3EAsk+your+question+today+by+entering+it+in+the+box+below%3C%2Fh5%3E%0A++++++++++%0A++++++++++%3Cp%3E%3Cstrong%3EStep+1%3A%3C%2Fstrong%3E+Choose+your+Category%3C%2Fp%3E%0A%09%09+++%3Cp+style%3D%22float%3A+left%3Bwidth%3A+621px%3B%22%3E%0A%09%09+++%3Cselect+name%3D%22Category%22+id%3D%22qmain_category%22+class%3D%22art-select+validate%5Brequired%5D%22+style%3D%22+%22+%3E%0A%09%09%09%09%3Coption+value%3D%22%22%3ESelect+primary+category%3C%2Foption%3E%0A%09%09%09%09%3Coption+value%3D%222%22%3EBuild%3C%2Foption%3E%0A%09%09%09%09%3Coption+value%3D%223%22%3EDecor%3C%2Foption%3E%0A%09%09%09%09%3Coption+value%3D%224%22%3EIndoor%3C%2Foption%3E%0A%09%09%09%09%3Coption+value%3D%225%22%3EOutdoor%3C%2Foption%3E%0A%09%09%09%09%3Coption+value%3D%226%22%3EGo+Green%3C%2Foption%3E%0A%09%09%09%3C%2Fselect%3E%0A%09%09%09%3C%2Fp%3E%0A%09%09%09%3Cp+style%3D%22float%3A+left%3Bwidth%3A+621px%3B%22%3E%09%09%09%0A%09%09%09%3Cselect+name%3D%22hsecond_category%22+class%3D%22art-select+validate%5Brequired%5D%22+id%3D%22qsecond_category%22%3E%0A%09%09%09%09%3Coption++value%3D%22%22%3ESelect+sub+category%3C%2Foption%3E%0A%09%09%09%3C%2Fselect%3E%0A%09%09%09%3C%2Fp%3E%09%09%0A+++++++++++%3Cp%3E%3Cstrong%3EStep+2%3A%3C%2Fstrong%3E+Ask+your+Question%3C%2Fp%3E%0A%09%09%09%3Cp%3E%0A++++++++++++++++++++++++++++%3Ctextarea+name%3D%22singleQuestionContent%22+class%3D%22validate%5Brequired%5D%22+cols%3D%2260%22+rows%3D%225%22+id%3D%22question_div%22+maxlength%3D%22140%22%3E%3C%2Ftextarea%3E%0A+++++++++++++++++++++++++%3Cdiv+class%3D%22character_count%22+id%3D%22character_count_question%22%3EYou+have+characters+%3Cspan%3E140%3C%2Fspan%3E+left%3C%2Fdiv%3E%3C%2Fp%3E%0A%09%09++%3Cinput+name%3D%22add%22+type%3D%22hidden%22+value%3D%22add%22+%2F%3E%0A+++++++++%0A++++++++++%3Cinput+name%3D%22Ask+your+Question%22+type%3D%22submit%22+value%3D%22Submit+Question%22+class%3D%22buttonStyleAdd%22+style%3D%22float%3A+left%3B%0A++++margin-top%3A+-32px%3B%22+id%3D%22qsubmit%22%2F%3E+%0A++++++++++%3C%2Fform%3E%0A++++++++++%3C%2Fdiv%3E%0A%09%09++%0A%09%09++'
  254   188    >   ECHO                                                     '++++++++++++%0A++++++++++++%09'
  256   189        FETCH_IS                                         ~146    '_GET'
        190        ISSET_ISEMPTY_DIM_OBJ                         0          ~146, 'cat'
        191      > JMPZ                                                     ~147, ->202
  257   192    >   INIT_FCALL_BY_NAME                                       'mysql_query'
        193        ROPE_INIT                                     3  ~151    'SELECT+%2A+FROM+questions+WHERE+Category+%3D+%27'
        194        FETCH_R                      global              ~148    '_GET'
        195        FETCH_DIM_R                                      ~149    ~148, 'cat'
        196        ROPE_ADD                                      1  ~151    ~151, ~149
        197        ROPE_END                                      2  ~150    ~151, '%27'
        198        SEND_VAL_EX                                              ~150
        199        DO_FCALL                                      0  $153    
        200        ASSIGN                                                   !25, $153
        201      > JMP                                                      ->206
  258   202    >   INIT_FCALL_BY_NAME                                       'mysql_query'
        203        SEND_VAL_EX                                              'SELECT+%2A+FROM+questions+order+by+id+desc'
        204        DO_FCALL                                      0  $155    
        205        ASSIGN                                                   !25, $155
  260   206    > > JMP                                                      ->387
  262   207    >   ECHO                                                     '++++++++%0A++++++++%3Cdiv+class%3D%22questionBox%22+id%3D%22box_'
  263   208        FETCH_DIM_R                                      ~157    !5, 'id'
        209        ECHO                                                     ~157
        210        ECHO                                                     '%22%3E%0A%09%3Ca+name%3D%22box_'
  264   211        FETCH_DIM_R                                      ~158    !5, 'id'
        212        ECHO                                                     ~158
        213        ECHO                                                     '%22%3E%3C%2Fa%3E%0A++++++++%0A++++++++%0A%3Cscript+type%3D%22text%2Fjavascript%22%3E%0A%0A%24%28%27%23seeanswers'
  269   214        FETCH_DIM_R                                      ~159    !5, 'id'
        215        ECHO                                                     ~159
        216        ECHO                                                     '%27%29.click%28function%28%29%7B%0A++%24%28%27%23hiddenComments'
  270   217        FETCH_DIM_R                                      ~160    !5, 'id'
        218        ECHO                                                     ~160
        219        ECHO                                                     '%27%29.toggle%28%29%3B%0A%7D%29%3B%0A%0A%0A%24%28%27%23giveanswer'
  274   220        FETCH_DIM_R                                      ~161    !5, 'id'
        221        ECHO                                                     ~161
        222        ECHO                                                     '%27%29.click%28function%28%29%7B%0A++%24%28%27%23giveanswerBox'
  275   223        FETCH_DIM_R                                      ~162    !5, 'id'
        224        ECHO                                                     ~162
        225        ECHO                                                     '%27%29.toggle%28%29%3B%0A%7D%29%3B%0A%0A%0A%3C%2Fscript%3E%09%0A%09%09%3Ch2%3E'
  280   226        FETCH_DIM_R                                      ~163    !5, 'Question'
        227        ECHO                                                     ~163
        228        ECHO                                                     '%3C%2Fh2%3E%0A++++++++++++++++'
  283   229        FETCH_DIM_R                                      ~164    !5, 'id'
        230        CONCAT                                           ~165    'SELECT+AuthorUserID+FROM+questions+WHERE+id%3D', ~164
        231        ASSIGN                                                   !13, ~165
  284   232

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142 ms | 1428 KiB | 19 Q