donfigga Posted May 4, 2010 Share Posted May 4, 2010 please help, I am trying to debug a php file, this file was working ok , I made some edits then tried to revert back to original file but now getting errors, Im prettty new to php so feeling a bit lost Thanks <?php session_start(); require_once dirname( __FILE__ ) . '/form_process.php'; ?> <?php get_header(); ?> <div class="content" id="page"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <?php $_SESSION['p_id']= $post->ID; $mypost = get_post($post->ID); $tmp=get_post_meta( $post->ID, 'companymail'); $_SESSION['companymail']=$tmp[0]; $posttime = $mypost->post_date; $posttime = explode(" ", $posttime); $currenttime = current_time(mysql); $currenttime = explode(" ", $currenttime); $inposttime = $posttime[0]; $inposttime = explode("-", $inposttime); $incurrenttime = $currenttime[0]; $incurrenttime = explode("-", $incurrenttime); /////////////////////////////////////////////////////////////////////////// $message = "new"; $a = mktime(0, 0, 0, $inposttime[1], $inposttime[2], $inposttime[0]); $b = mktime(0, 0, 0, $incurrenttime[1], $incurrenttime[2], $incurrenttime[0]); if ( abs($b-$a) > (30*24*3600) ) { $message = "old"; } if ( $message == "old" ) { echo "<div class=\"atention\"><strong>Atention</strong>! This Job is older than 30 days!</div>"; } $pageURL = 'http'; if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";} $pageURL .= "://"; if ($_SERVER["SERVER_PORT"] != "80") {http://www.prosperjobs.net/wp-admin/theme-editor.php?file=/themes/JobPress/single.php&theme=JobPress+Wordpress+Theme&dir=theme $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; } else { $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; } $action= $pageURL; ?> <script type="text/javascript" src="<?=bloginfo('url')?>/wp-content/themes/JobPress/jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ check=0; //hide the all of the element with class msg_body $(".msg_body").hide(); //toggle the componenet with class msg_body $(".msg_head").click(function(){ $(this).next(".msg_body").slideToggle(50); check++; if(check%2==0) { document.send_email.apply.value="+ Apply Online"; } else { document.send_email.apply.value="- Apply Online"; } }); }); </script> <style type="text/css"> .msg_head { cursor: pointer; position: relative; background-color:#FF3D00; margin:1px; background: url(<?=bloginfo('url')?>/wp-content/themes/JobPress/images/submitbutton_a_o.jpg); width: 118px; text-align: left; color: #ffffff; display: block; height: 28px; padding-left:3px;border:0px;color:#ffffff;font-size:14px;font-weight:bold; } .msg_body { background-color:#F4F4F8; } div.sociable { margin: 0px 0; } span.sociable_tagline { position: relative; } span.sociable_tagline span { display: none; width: 14em; } span.sociable_tagline:hover span { position: absolute; display: block; top: -5em; background: #ffe; border: 1px solid #ccc; color: black; line-height: 1.25em; } .sociable span { display: block; } .sociable ul { display: inline; margin: 0 !important; padding: 0 !important; } .sociable ul li { background: none; display: inline !important; list-style-type: none; margin: 0; padding: 9px; } .sociable ul li:before { content: ""; } .sociable img { float: none; width: 19px; height: 19px; border: 0; margin: 0; padding: 0; } .sociable-hovers { opacity: .4; -moz-opacity: .4; filter: alpha(opacity=40); } .sociable-hovers:hover { opacity: 1; -moz-opacity: 1; filter: alpha(opacity=100); } .link { color: #FF3D00 } .link:hover { color: #000000 } </style> <h2><?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?></h2> <div class="company-details"> <big>at <a href="<?php $key="companylink"; echo get_post_meta($post->ID, $key, true); ?>"><?php $key="company"; echo get_post_meta($post->ID, $key, true); ?></a> <span>(<?php $key="location"; echo get_post_meta($post->ID, $key, true); ?>)</span></big> <small><?php $key="jobtype"; $jobtype = get_post_meta($post->ID, $key, true); if($jobtype == "freelance") { echo "<span class=\"fl\">Freelance</span>"; } else { if($jobtype == "parttime") { echo "<span class=\"pt\">Part Time</span>"; } else { if($jobtype == "fulltime") { echo "<span class=\"ft\">Full Time</span>"; } } } ?> <?php the_time('l, F jS, Y'); ?></small> </div> <div style="padding-top:0px;"> <?php if(get_option('sharethisjob') == "Enable" || get_option('sharethisjob') == "") { ?> <div style="padding-left:1px;"> <h3>Share this Job</h3> </div> <div class="sociable" align="center" style="padding-top:5px;"> <ul > <li class="sociablefirst"><a rel="nofollow" target="_blank" href="http://digg.com/submit?phase=2&url=<?=$action;?>&title=<?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?>" title="Digg"><img src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li> <li><a rel="nofollow" target="_blank" href="http://sphinn.com/index.php?c=post&m=submit&link=<?=$action;?>" title="Sphinn"><img src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a></li> <li><a rel="nofollow" target="_blank" href="http://delicious.com/post?url=<?=$action;?>&title=<?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?>" title="del.icio.us"><img src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li> <li><a rel="nofollow" target="_blank" href="http://www.facebook.com/share.php?u=<?=$action;?>&t=<?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?>" title="Facebook"><img src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li> <li><a rel="nofollow" target="_blank" href="http://www.mixx.com/submit?page_url=<?=$action;?>&title=<?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?>" title="Mixx"><img src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a></li> <li><a rel="nofollow" target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&bkmk=<?=$action;?>&title=<?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?>" title="Google Bookmarks"><img src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li> <li><a rel="nofollow" target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&url=<?=$action;?>&title=<?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?>" title="LinkedIn"><img src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li> <li><a rel="nofollow" target="_blank" href="http://www.netvibes.com/share?title=<?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?>&url=<?=$action;?>" title="Netvibes"><img src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a></li> <li><a rel="nofollow" target="_blank" href="http://reddit.com/submit?url=<?=$action;?>&title=<?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?>" title="Reddit"><img src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li> <li><a rel="nofollow" target="_blank" href="http://www.sphere.com/search?q=sphereit:<?=$action;?>&title=<?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?>" title="SphereIt"><img src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/sphere.png" title="SphereIt" alt="SphereIt" class="sociable-hovers" /></a></li> <li><a rel="nofollow" target="_blank" href="http://www.stumbleupon.com/submit?url=<?=$action;?>&title=<?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?>" title="StumbleUpon"><img src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li> <li><a rel="nofollow" target="_blank" href="http://technorati.com/faves?add=<?=$action;?>" title="Technorati"><img src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li> <li class="sociablelast"><a rel="nofollow" target="_blank" href="http://twitter.com/home?status=Ferrari%20F430%20-%20Used%202008%20Low%20Miles%20-%20<?=$action;?>" title="Twitter"><img src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li> </ul> </div> <?php } ?> <div class="job-details"> <?php the_content(); ?> </div> <?php endwhile; endif; ?> <div style="padding-bottom:15px;"> <a href="<?php bloginfo('url'); ?>?email_to_friend=true" title="Click here to email." rel="nofollow"> <img align="absBottom" src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/email_famfamfam.png" alt="Email This Job" title="Email This Job" style="border: 0px;" /></a> <a class="link" href="<?php bloginfo('url'); ?>?email_to_friend=true" title="Click here to email." title="Print This Post" rel="nofollow" style="font-size:12px;">Email This Job</a> <a href="#Print" onclick="window.print(); return false;" title="Click here to print." rel="nofollow"> <img align="absBottom" src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/print.gif" alt="Print This Post" title="Print This Post" style="border: 0px;" /></a> <a class="link" href="#Print" onclick="window.print(); return false;" title="Click here to print." title="Print This Post" rel="nofollow" style="font-size:12px;">Print This Job</a> </div> <?php if (1) { ?> <div style="padding-top:0px;"> <?php if(get_option('applyonline') == "Enable" || get_option('applyonline') == "") { ?> <div style="border-top: solid 2px #F0EBE4; clear: both; margin: 0px 0px 10px 0px;" ></div> <form id="send_email" name="send_email" method="post" action="<?=$action;?>" enctype="multipart/form-data" > <input type="hidden" name="action" value="send" /> <?php wp_nonce_field('send_email'); ?> <?php if ($error != "") { if($error=="null") { echo "<div style='font-size:9px;border: solid 0px #FF5019; background: #f7f7ED; color: #21326A; line-height: 18px; padding-left:5px;' class=\"err\">"."Your email has been sent to the employer"."</div>"; } else echo "<div style='font-size:9px; padding-left:5px;' class=\"err\">".$error."</div>"; } ?> <input id="apply" class="msg_head" type="button" value="+ Apply Online" /> <div class="msg_body"> <table style="font-size:11px;" border="0" height="100%"> <tr height="5"> <td > </td> </tr> <tr> <td > Your Name: </td> </tr> <tr> <td > <input type="text" name="fullname"/> </td> </tr> <tr> <td > Your Email: <span style="color:#ff0000;">*</span> </td> </tr> <tr> <td > <input type="text" name="email"/> </td> </tr> <tr> <td > Subject: <span style="color:#ff0000;">*</span> </td> </tr> <tr> <td > <input type="text" name="subject"/> </td> </tr> <tr> <td > Message: <span style="color:#ff0000;">*</span> </td> </tr> <tr> <td > <textarea name="message" rows=5 cols=30></textarea> </td> </tr> <tr> <td > Upload Resume: <span style="color:#ff0000;"></span> </td> </tr> <tr> <td > <input type="file" name="fileatt[]" id="fileatt[]" size="26"/> </td> </tr> <tr> <td > Upload Covering Letter: <span style="color:#ff0000;"></span> </td> </tr> <tr> <td > <input type="file" name="fileatt[]" id="fileatt[]" size="26"/> </td> </tr> <tr> <td > <img src="<?=bloginfo('url')?>/wp-content/themes/JobPress/CaptchaSecurityImages.php?width=100&height=40&characters=5" /><br /> Verifying code:(input 5 characters) <span style="color:#ff0000;">*</span><br /> <input type='text' name='code' maxlength="5" size="11"/> </td> </tr> <tr> <td style="padding-top:5px;"> <input id="submit" name="submit" type="submit" value="Send email" style="width:80px;height:20px;padding-top:1px;" /> </td> </tr> </table> </div> </form> <?php } } ?> </div> </div> <?php $t=get_the_category($post->ID); //The Query //query_posts('showposts=6&cat='.$t[0]->term_id.'meta_key=p&meta_compare=!=&meta_value=8'.'&orderby=post_date&order=desc'); $args = array( 'showposts' => 5, 'cat' => $t[0]->term_id, 'post__not_in' => array($_SESSION['p_id']), 'orderby' => 'post_date', 'order' => 'desc' ); query_posts($args); //The Loop if ( have_posts() ) : $salt = 0; ?> <br/> <hr/> <div class="content" id="jobs"> <h3>Recently in <?=the_category($post->ID);?></h3> <br/> <ul class="listing"> <?php while ( have_posts() ) : the_post(); $salt++; $mypost = get_post($post->ID); $arr=explode("/",$_SERVER['REQUEST_URI']); //if(trim($_GET['p'])!=trim($mypost->ID)) //if ($arr[3]!=$post->post_name) { ?> <?php $jobtype = $_GET['jobtype']; if($jobtype !== "fulltime" && $jobtype !== "parttime" && $jobtype !=="freelance") { ?> <li class="<?php if($salt % 2 == 0) { echo 'item alt'; } else { echo 'item'; }?>" <?php echo $pid; ?>><?php echo $alt; ?> <big><a href="<?php the_permalink(); ?>"><?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?></a></big> <small><?php $key="jobtype"; $jobtype = get_post_meta($post->ID, $key, true); if($jobtype == "freelance") { echo "<span class=\"fl\">Freelance</span>"; } else { if($jobtype == "parttime") { echo "<span class=\"pt\">Part Time</span>"; } else { if($jobtype == "fulltime") { echo "<span class=\"ft\">Full Time</span>"; } } } ?> at <a href="<?php $key="companylink"; echo get_post_meta($post->ID, $key, true); ?>"><?php $key="company"; echo get_post_meta($post->ID, $key, true); ?></a> (<?php $key="location"; echo get_post_meta($post->ID, $key, true); ?>)</small> <em><strong><?php the_time('j'); ?></strong><?php the_time('F'); ?></em> <div class="cl"></div> </li> <?php } ?> <?php } endwhile; ?> </ul> </div> <?php else: endif; //Reset Query wp_reset_query(); ?> </div> <?php get_sidebar(); ?> <?php get_footer(); ?> Quote Link to comment https://forums.phpfreaks.com/topic/200646-php-dubugging/ Share on other sites More sharing options...
Muddy_Funster Posted May 4, 2010 Share Posted May 4, 2010 OK, any chance you can post the errors? And PLEASE post your php between the php tags. Quote Link to comment https://forums.phpfreaks.com/topic/200646-php-dubugging/#findComment-1052904 Share on other sites More sharing options...
donfigga Posted May 4, 2010 Author Share Posted May 4, 2010 Hi Muddy_Funster I dont actually get any errors, just a blank page, so there must be an error because the page was working ok just previously, it is something really silly with the syntax, Quote Link to comment https://forums.phpfreaks.com/topic/200646-php-dubugging/#findComment-1052908 Share on other sites More sharing options...
Muddy_Funster Posted May 4, 2010 Share Posted May 4, 2010 Is this a local server? If so you need to turn error reporting on, if not you need to shoot the admin and find a more practical development envyronment...I'll look through the code but it'll take a while... Quote Link to comment https://forums.phpfreaks.com/topic/200646-php-dubugging/#findComment-1052909 Share on other sites More sharing options...
donfigga Posted May 4, 2010 Author Share Posted May 4, 2010 Hi Muddy_Funster Thanks for your reply, its a wordpress host. Its really strange cos all I did was add 4 lines of code to send an email, when I noticed the code was causing an issue, I deleted the 4 lines and since then the page has stopped working, thanks for your help Quote Link to comment https://forums.phpfreaks.com/topic/200646-php-dubugging/#findComment-1052912 Share on other sites More sharing options...
Muddy_Funster Posted May 4, 2010 Share Posted May 4, 2010 in your $pageURL building you have this little problem : if ($_SERVER["SERVER_PORT"] != "80") {http://www.prosperjobs.net/wp-admin/theme-editor.php?file=/themes/JobPress/single.php&theme=JobPress+Wordpress+Theme&dir=theme that URL isn't supposed to be there I don't think, and if it is you need to quote and assigne it. still working through it, hitting lotts of function errors cause of not having the included file, but I'll get there. Quote Link to comment https://forums.phpfreaks.com/topic/200646-php-dubugging/#findComment-1052913 Share on other sites More sharing options...
donfigga Posted May 4, 2010 Author Share Posted May 4, 2010 Hi Mundy Thanks for your help, Im just concerned that we might be looking at the wrong issue , The site was working perfectly, alll I did was add a few lines of code, then it broke the site. I tried to revert by removing the code but to no avail. I suspect there is a simple syntax issue that is breaking the page. I appreciate your effort, just trying to steer in the right direction Thanks a lot Quote Link to comment https://forums.phpfreaks.com/topic/200646-php-dubugging/#findComment-1052996 Share on other sites More sharing options...
Muddy_Funster Posted May 4, 2010 Share Posted May 4, 2010 Do you have the code that you inserted? and where in that ling list did you put it? I am having no luck getting arround the missing functions from the include file. Quote Link to comment https://forums.phpfreaks.com/topic/200646-php-dubugging/#findComment-1052997 Share on other sites More sharing options...
donfigga Posted May 4, 2010 Author Share Posted May 4, 2010 I can give you access to the server if that would help, Im getting desparate Quote Link to comment https://forums.phpfreaks.com/topic/200646-php-dubugging/#findComment-1053000 Share on other sites More sharing options...
donfigga Posted May 4, 2010 Author Share Posted May 4, 2010 The code was basically 4 lines to send an email. I have sonce deleted it but it was near the top of the file, eg <div class="content" id="page"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <?php $_SESSION['p_id']= $post->ID; Quote Link to comment https://forums.phpfreaks.com/topic/200646-php-dubugging/#findComment-1053002 Share on other sites More sharing options...
PFMaBiSmAd Posted May 4, 2010 Share Posted May 4, 2010 If you post any more code, please post it between the forum's tags. See the # button in the forum's menu to put tags around selected text when you are writing your post. Quote Link to comment https://forums.phpfreaks.com/topic/200646-php-dubugging/#findComment-1053006 Share on other sites More sharing options...
donfigga Posted May 4, 2010 Author Share Posted May 4, 2010 Thanks PFMaBiSmAd Unfortunately I dont have the time, It ws stupid of me not to back up the file, The error is something very simple , all Im asking for is an experienced eye to look over it. Next time try to be more helpful in the context of the problem Quote Link to comment https://forums.phpfreaks.com/topic/200646-php-dubugging/#findComment-1053011 Share on other sites More sharing options...
PFMaBiSmAd Posted May 4, 2010 Share Posted May 4, 2010 The suggestion to post your code properly in the forum was so that more of the helpful forum members would even look at it. Posting code using the code /code tags also adds highlighting that usually helps point out where something is wrong in a file. Quote Link to comment https://forums.phpfreaks.com/topic/200646-php-dubugging/#findComment-1053018 Share on other sites More sharing options...
Muddy_Funster Posted May 4, 2010 Share Posted May 4, 2010 how about having a look at this line: <script type="text/javascript" src="<?=bloginfo('url')?>/wp-content/themes/JobPress/jquery.js"></script> I'm concerned about the ?'s here, but I'm not one for JS, it may be nothing :-\ And in all fairness the code tags for take seconds to impliment and make it much easier for everone to get to grips with the code (and it's in the forum rules too) Quote Link to comment https://forums.phpfreaks.com/topic/200646-php-dubugging/#findComment-1053019 Share on other sites More sharing options...
donfigga Posted May 4, 2010 Author Share Posted May 4, 2010 <?php session_start(); require_once dirname( __FILE__ ) . '/form_process.php'; ?> <?php get_header(); ?> <div class="content" id="page"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <?php $_SESSION['p_id']= $post->ID; $mypost = get_post($post->ID); $tmp=get_post_meta( $post->ID, 'companymail'); $_SESSION['companymail']=$tmp[0]; $posttime = $mypost->post_date; $posttime = explode(" ", $posttime); $currenttime = current_time(mysql); $currenttime = explode(" ", $currenttime); $inposttime = $posttime[0]; $inposttime = explode("-", $inposttime); $incurrenttime = $currenttime[0]; $incurrenttime = explode("-", $incurrenttime); /////////////////////////////////////////////////////////////////////////// $message = "new"; $a = mktime(0, 0, 0, $inposttime[1], $inposttime[2], $inposttime[0]); $b = mktime(0, 0, 0, $incurrenttime[1], $incurrenttime[2], $incurrenttime[0]); if ( abs($b-$a) > (30*24*3600) ) { $message = "old"; } if ( $message == "old" ) { echo "<div class=\"atention\"><strong>Atention</strong>! This Job is older than 30 days!</div>"; } $pageURL = 'http'; if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";} $pageURL .= "://"; if ($_SERVER["SERVER_PORT"] != "80") {http://www.prosperjobs.net/wp-admin/theme-editor.php?file=/themes/JobPress/single.php&theme=JobPress+Wordpress+Theme&dir=theme $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; } else { $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; } $action= $pageURL; ?> <script type="text/javascript" src="<?=bloginfo('url')?>/wp-content/themes/JobPress/jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ check=0; //hide the all of the element with class msg_body $(".msg_body").hide(); //toggle the componenet with class msg_body $(".msg_head").click(function(){ $(this).next(".msg_body").slideToggle(50); check++; if(check%2==0) { document.send_email.apply.value="+ Apply Online"; } else { document.send_email.apply.value="- Apply Online"; } }); }); </script> <style type="text/css"> .msg_head { cursor: pointer; position: relative; background-color:#FF3D00; margin:1px; background: url(<?=bloginfo('url')?>/wp-content/themes/JobPress/images/submitbutton_a_o.jpg); width: 118px; text-align: left; color: #ffffff; display: block; height: 28px; padding-left:3px;border:0px;color:#ffffff;font-size:14px;font-weight:bold; } .msg_body { background-color:#F4F4F8; } div.sociable { margin: 0px 0; } span.sociable_tagline { position: relative; } span.sociable_tagline span { display: none; width: 14em; } span.sociable_tagline:hover span { position: absolute; display: block; top: -5em; background: #ffe; border: 1px solid #ccc; color: black; line-height: 1.25em; } .sociable span { display: block; } .sociable ul { display: inline; margin: 0 !important; padding: 0 !important; } .sociable ul li { background: none; display: inline !important; list-style-type: none; margin: 0; padding: 9px; } .sociable ul li:before { content: ""; } .sociable img { float: none; width: 19px; height: 19px; border: 0; margin: 0; padding: 0; } .sociable-hovers { opacity: .4; -moz-opacity: .4; filter: alpha(opacity=40); } .sociable-hovers:hover { opacity: 1; -moz-opacity: 1; filter: alpha(opacity=100); } .link { color: #FF3D00 } .link:hover { color: #000000 } </style> <h2><?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?></h2> <div class="company-details"> <big>at <a href="<?php $key="companylink"; echo get_post_meta($post->ID, $key, true); ?>"><?php $key="company"; echo get_post_meta($post->ID, $key, true); ?></a> <span>(<?php $key="location"; echo get_post_meta($post->ID, $key, true); ?>)</span></big> <small><?php $key="jobtype"; $jobtype = get_post_meta($post->ID, $key, true); if($jobtype == "freelance") { echo "<span class=\"fl\">Freelance</span>"; } else { if($jobtype == "parttime") { echo "<span class=\"pt\">Part Time</span>"; } else { if($jobtype == "fulltime") { echo "<span class=\"ft\">Full Time</span>"; } } } ?> <?php the_time('l, F jS, Y'); ?></small> </div> <div style="padding-top:0px;"> <?php if(get_option('sharethisjob') == "Enable" || get_option('sharethisjob') == "") { ?> <div style="padding-left:1px;"> <h3>Share this Job</h3> </div> <div class="sociable" align="center" style="padding-top:5px;"> <ul > <li class="sociablefirst"><a rel="nofollow" target="_blank" href="http://digg.com/submit?phase=2&url=<?=$action;?>&title=<?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?>" title="Digg"><img src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li> <li><a rel="nofollow" target="_blank" href="http://sphinn.com/index.php?c=post&m=submit&link=<?=$action;?>" title="Sphinn"><img src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a></li> <li><a rel="nofollow" target="_blank" href="http://delicious.com/post?url=<?=$action;?>&title=<?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?>" title="del.icio.us"><img src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li> <li><a rel="nofollow" target="_blank" href="http://www.facebook.com/share.php?u=<?=$action;?>&t=<?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?>" title="Facebook"><img src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li> <li><a rel="nofollow" target="_blank" href="http://www.mixx.com/submit?page_url=<?=$action;?>&title=<?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?>" title="Mixx"><img src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a></li> <li><a rel="nofollow" target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&bkmk=<?=$action;?>&title=<?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?>" title="Google Bookmarks"><img src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li> <li><a rel="nofollow" target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&url=<?=$action;?>&title=<?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?>" title="LinkedIn"><img src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li> <li><a rel="nofollow" target="_blank" href="http://www.netvibes.com/share?title=<?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?>&url=<?=$action;?>" title="Netvibes"><img src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a></li> <li><a rel="nofollow" target="_blank" href="http://reddit.com/submit?url=<?=$action;?>&title=<?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?>" title="Reddit"><img src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li> <li><a rel="nofollow" target="_blank" href="http://www.sphere.com/search?q=sphereit:<?=$action;?>&title=<?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?>" title="SphereIt"><img src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/sphere.png" title="SphereIt" alt="SphereIt" class="sociable-hovers" /></a></li> <li><a rel="nofollow" target="_blank" href="http://www.stumbleupon.com/submit?url=<?=$action;?>&title=<?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?>" title="StumbleUpon"><img src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li> <li><a rel="nofollow" target="_blank" href="http://technorati.com/faves?add=<?=$action;?>" title="Technorati"><img src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li> <li class="sociablelast"><a rel="nofollow" target="_blank" href="http://twitter.com/home?status=Ferrari%20F430%20-%20Used%202008%20Low%20Miles%20-%20<?=$action;?>" title="Twitter"><img src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li> </ul> </div> <?php } ?> <div class="job-details"> <?php the_content(); ?> </div> <?php endwhile; endif; ?> <div style="padding-bottom:15px;"> <a href="<?php bloginfo('url'); ?>?email_to_friend=true" title="Click here to email." rel="nofollow"> <img align="absBottom" src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/email_famfamfam.png" alt="Email This Job" title="Email This Job" style="border: 0px;" /></a> <a class="link" href="<?php bloginfo('url'); ?>?email_to_friend=true" title="Click here to email." title="Print This Post" rel="nofollow" style="font-size:12px;">Email This Job</a> <a href="#Print" onclick="window.print(); return false;" title="Click here to print." rel="nofollow"> <img align="absBottom" src="<?=bloginfo('url')?>/wp-content/themes/JobPress/images/print.gif" alt="Print This Post" title="Print This Post" style="border: 0px;" /></a> <a class="link" href="#Print" onclick="window.print(); return false;" title="Click here to print." title="Print This Post" rel="nofollow" style="font-size:12px;">Print This Job</a> </div> <?php if (1) { ?> <div style="padding-top:0px;"> <?php if(get_option('applyonline') == "Enable" || get_option('applyonline') == "") { ?> <div style="border-top: solid 2px #F0EBE4; clear: both; margin: 0px 0px 10px 0px;" ></div> <form id="send_email" name="send_email" method="post" action="<?=$action;?>" enctype="multipart/form-data" > <input type="hidden" name="action" value="send" /> <?php wp_nonce_field('send_email'); ?> <?php if ($error != "") { if($error=="null") { echo "<div style='font-size:9px;border: solid 0px #FF5019; background: #f7f7ED; color: #21326A; line-height: 18px; padding-left:5px;' class=\"err\">"."Your email has been sent to the employer"."</div>"; } else echo "<div style='font-size:9px; padding-left:5px;' class=\"err\">".$error."</div>"; } ?> <input id="apply" class="msg_head" type="button" value="+ Apply Online" /> <div class="msg_body"> <table style="font-size:11px;" border="0" height="100%"> <tr height="5"> <td > </td> </tr> <tr> <td > Your Name: </td> </tr> <tr> <td > <input type="text" name="fullname"/> </td> </tr> <tr> <td > Your Email: <span style="color:#ff0000;">*</span> </td> </tr> <tr> <td > <input type="text" name="email"/> </td> </tr> <tr> <td > Subject: <span style="color:#ff0000;">*</span> </td> </tr> <tr> <td > <input type="text" name="subject"/> </td> </tr> <tr> <td > Message: <span style="color:#ff0000;">*</span> </td> </tr> <tr> <td > <textarea name="message" rows=5 cols=30></textarea> </td> </tr> <tr> <td > Upload Resume: <span style="color:#ff0000;"></span> </td> </tr> <tr> <td > <input type="file" name="fileatt[]" id="fileatt[]" size="26"/> </td> </tr> <tr> <td > Upload Covering Letter: <span style="color:#ff0000;"></span> </td> </tr> <tr> <td > <input type="file" name="fileatt[]" id="fileatt[]" size="26"/> </td> </tr> <tr> <td > <img src="<?=bloginfo('url')?>/wp-content/themes/JobPress/CaptchaSecurityImages.php?width=100&height=40&characters=5" /><br /> Verifying code:(input 5 characters) <span style="color:#ff0000;">*</span><br /> <input type='text' name='code' maxlength="5" size="11"/> </td> </tr> <tr> <td style="padding-top:5px;"> <input id="submit" name="submit" type="submit" value="Send email" style="width:80px;height:20px;padding-top:1px;" /> </td> </tr> </table> </div> </form> <?php } } ?> </div> </div> <?php $t=get_the_category($post->ID); //The Query //query_posts('showposts=6&cat='.$t[0]->term_id.'meta_key=p&meta_compare=!=&meta_value=8'.'&orderby=post_date&order=desc'); $args = array( 'showposts' => 5, 'cat' => $t[0]->term_id, 'post__not_in' => array($_SESSION['p_id']), 'orderby' => 'post_date', 'order' => 'desc' ); query_posts($args); //The Loop if ( have_posts() ) : $salt = 0; ?> <br/> <hr/> <div class="content" id="jobs"> <h3>Recently in <?=the_category($post->ID);?></h3> <br/> <ul class="listing"> <?php while ( have_posts() ) : the_post(); $salt++; $mypost = get_post($post->ID); $arr=explode("/",$_SERVER['REQUEST_URI']); //if(trim($_GET['p'])!=trim($mypost->ID)) //if ($arr[3]!=$post->post_name) { ?> <?php $jobtype = $_GET['jobtype']; if($jobtype !== "fulltime" && $jobtype !== "parttime" && $jobtype !=="freelance") { ?> <li class="<?php if($salt % 2 == 0) { echo 'item alt'; } else { echo 'item'; }?>" <?php echo $pid; ?>><?php echo $alt; ?> <big><a href="<?php the_permalink(); ?>"><?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?></a></big> <small><?php $key="jobtype"; $jobtype = get_post_meta($post->ID, $key, true); if($jobtype == "freelance") { echo "<span class=\"fl\">Freelance</span>"; } else { if($jobtype == "parttime") { echo "<span class=\"pt\">Part Time</span>"; } else { if($jobtype == "fulltime") { echo "<span class=\"ft\">Full Time</span>"; } } } ?> at <a href="<?php $key="companylink"; echo get_post_meta($post->ID, $key, true); ?>"><?php $key="company"; echo get_post_meta($post->ID, $key, true); ?></a> (<?php $key="location"; echo get_post_meta($post->ID, $key, true); ?>)</small> <em><strong><?php the_time('j'); ?></strong><?php the_time('F'); ?></em> <div class="cl"></div> </li> <?php } ?> <?php } endwhile; ?> </ul> </div> <?php else: endif; //Reset Query wp_reset_query(); ?> </div> <?php get_sidebar(); ?> <?php get_footer(); ?> Quote Link to comment https://forums.phpfreaks.com/topic/200646-php-dubugging/#findComment-1053030 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.