test some code
Php
code posted
by
guest1
created at 25 Aug 01:06, updated at 28 Aug 22:16
Edit
|
Back
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
<?php echo tag('link', array('rel'=>'stylesheet', 'type'=>'text/css', 'media'=>'screen', 'href'=>'/~qannah/css/website/cat.css')); function fileExists($path) { return (@GetImageSize($path)==true); } $lang = $sf_user->getCulture(); if($lang=='en'): ?> <div style="float: right; text-align: left; width: 65%; direction: ltr"> <p style="font-weight: bold; padding: 40px 15px 30px 0px; line-height: 22px; font-size: 15px;"> <span style="color: red; font-size: 18px;">Sorry, this page is lost or not available now!</span> <br><br> Please check the correct spelling of the URL. <br> If you have any trouble on ewaseet, try visit ewaseet <a href="<?php echo url_for(homepage) ?>" style="text-decoration: none; color: #C20D0D;">Homepage</a> or use ewaseet <a href="<?php echo url_for(content_show, array(id=>2)) ?>" style="text-decoration: none; color: #C20D0D;">Help</a> tool if you need further assistance. </p> </div> <div style="float: left; width: 35%; direction: ltr"> <img style="padding-bottom: 20px; padding-top: 37px; width: 80%;" src="page404.jpg"> </div> <?php else: ?> <div style="float: left; text-align: right; width: 65%; direction: rtl"> <p style="font-weight: bold; padding: 40px 0 30px 15px;"> <span style="color: red; font-size: 18px;">عذرًا ، الإعلان الذي تبحث عنه غير موجود أو غير متوفر الآن</span> <br><br> يرجى التحقق من الإملاء الصحيح للعنوان. <br> إذا واجهتك مشكلة في العثور على وجهة الوسيط، فحاول زيارة صفحة الوسيط <a href="<?php echo url_for(homepage) ?>" style="text-decoration: none; color: #C20D0D;"> الرئيسية </a> أو استخدم <a href="<?php echo url_for(content_show, array(id=>2)) ?>" style="text-decoration: none; color: #C20D0D;"> مساعدة </a> الوسيط إذا كنت بحاجة إلى مزيد من المساعدة </p> </div> <div style="float: right; width: 35%; direction: rtl"> <img style="padding-bottom: 20px; padding-top: 42px; width: 80%;" src="page404.jpg"> </div> <?php endif; ?> <?php if(count($items)==0) { echo "<div style='text-align:center; font-weight: bold'> لا يوجد نتائج</div>"; } else { echo '<div style="clear: both; margin: auto; color: rgb(255, 255, 255); font-size: 16px; line-height: 27px; background: url(\'gradient2.png\') repeat-x scroll center bottom transparent; border-radius: 6px 6px 6px 6px; border: 1px solid rgb(108, 99, 99); width: 99%;">يمكنك مشاهدة أحدث الإعلانات لدينا</div>'; } foreach($items as $item) { echo "<div class=\"classified\">"; echo "<div style=\"width: 100%;\">"; echo "</div>"; echo "<div class=\"specifications\">"; $c3 = new Criteria(); $c3->addJoin(ItemImagesPeer::ITEM_ID, ItemPeer::ID); $c3->add(ItemImagesPeer::ITEM_ID, $item->getId()); $img = ItemImagesPeer::doSelectOne($c3); // $main_image = $img->getPath(); // // $filename = websiteGlabol::ITEM_IMAGES_PATH . $main_image; // // $fileexists = false; $fileexists = false; $main_image = $item->get_item_main_image(); //this is to get thje best image size to fit in the slider box $filename = websiteGlabol::ITEM_IMAGES_PATH . $main_image . "_thumb.png"; if(trim($main_image)!=''&&fileExists($filename)) { $fileexists = true; // if(trim($main_image)!='' && fileExists($filename)) // { // $fileexists = true; echo '<div class="photo"><a href="' . url_for('item/' . $item->getId()) . '"><img src="' . $filename . '" /></a></div>'; } else { echo ' <div class="photo"><img src="categories/noPreview/noPreview-' . $item->getMainCat()->getId() . '.png"/></div>'; } echo '<div class="details">'; echo '<dl><dt>'; ?> <dd class="title"><ul><li><a class="no_decor" href="<?php echo url_for('item/' . $item->getId()); ?> "><?php echo $item->getTitle(); ?> - <font style="color:#F32229; font-size: 14px;"><?php echo $item->getCountry(); ?></font></a></li></ul></dd> <dd id="description"> <?php echo $item->getBriefDescription(); ?> </dd> </dt></dl> </div> <div> <div class="share_details"> <!-- <g:plusone annotation="none" href="<?php echo url_for('item/' . $item->getId()); ?>"></g:plusone> <a href="<?php echo "http://www.facebook.com/sharer.php?u=" . url_for('item/' . $item->getId()) . '&t=' . $item->getTitle(); ?>"><img src="connect_favicon.png" /></a><img src="twitter.png" /><img src="send_to_friend.png" />--> <!-- Start Shareaholic Classic Bookmarks HTML--> <div class="shr_classic shareaholic-show-on-load"> </div> <!-- End Shareaholic Classic Bookmarks HTML --> <!-- Start Shareaholic Classic Bookmarks settings --> <script type="text/javascript"> var SHRCB_Settings = {"shr_classic":{"size":16,"link":"http://www.waseetjo.com/<?php echo url_for('item/' . $item->getId()); ?>","service":"5,7,313,309,304,88","apikey":"2fc518bd8c0bb3cf45bdade11877971c1","shortener":"bitly","shortener_key":"","designer_toolTips":true,"twitter_template":"${title} - ${short_link} via @Shareaholic"}}; var SHRCB_Globals = {"perfoption":"1"}; </script> <!-- End Shareaholic Classic Bookmarks settings --> <!-- Start Shareaholic Classic Bookmarks script --> <script type="text/javascript"> (function() { var sb = document.createElement("script"); sb.type = "text/javascript";sb.async = true; sb.src = ("https:" == document.location.protocol ? "https://dtym7iokkjlif.cloudfront.net" : "http://cdn.shareaholic.com") + "/media/js/jquery.shareaholic-publishers-cb.min.js"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(sb, s); })(); </script> <!-- End Shareaholic Classic Bookmarks script --> </div> <div class="more_details"> <a class="no_decor" href="<?php echo url_for('item/' . $item->getId()); ?>"><?php echo __('Details'); ?> <img src="more_details.png" style="vertical-align: middle;" /></a> </div> </div> </div> </div> <?php } ?> |
6.46 KB in 10 ms with coderay