Advertisement
Guest User

plugin content file

a guest
Jun 18th, 2012
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.06 KB | None | 0 0
  1. <?php
  2. /*
  3. if($include_flag == 1)
  4. {
  5. */
  6. function showHome($project)
  7. {
  8.     $home_query = mysql_query("SELECT * FROM mod_verkoopstatus WHERE project = '$project'") or die(mysql_error());
  9.     while($home_info = mysql_fetch_object($home_query))
  10.     {
  11.         if($home_info->status == 1)
  12.         {
  13.             $color = '#2E2EFE';
  14.         }
  15.         if($home_info->status == 2)
  16.         {
  17.             $color = '#3E8028';
  18.         }
  19.         if($home_info->status == 3)
  20.         {
  21.             $color = '#F26A20';
  22.         }
  23.         if($home_info->status == 4)
  24.         {
  25.             $color = '#F1F121';
  26.         }
  27.         echo '<a target="_self" href="http://localhost/abc/wp-admin/admin.php?page=Verkoopstatus'.$home_info->project.'&nr='.$home_info->nr.'">';
  28.         echo '<div style="position: absolute; border: 1px solid black; margin-left: '.$home_info->left.'px; margin-top: '.$home_info->top.'px; height: '.$home_info->height.'px; width: '.$home_info->width.'px; background-color: '.$color.'"><p style="padding-top: 0px; margin-top: 0px;" align="center">'.$home_info->nr.'</p></div>';
  29.         echo '</a>';
  30.     }
  31. }
  32.  
  33. if(isset($_GET['project']) && !empty($_GET['project']) && isset($_GET['nr']) && !empty($_GET['nr']))
  34. {
  35.     mysql_query("UPDATE mod_verkoopstatus SET status = status + 1 WHERE project = '".$_GET['project']."' AND nr = '".$_GET['nr']."'") or die(mysql_error());
  36.     mysql_query("UPDATE mod_verkoopstatus SET status = status - 4 WHERE status > 4 ") or die(mysql_error()); //na 4 weer naar status 1
  37. }
  38.  
  39. ?>
  40. <div class="wrap">  
  41. <table width="650" height="350" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000" bgcolor="#ffffff">
  42.     <tr>
  43.         <td width="650" valign="top">
  44.             <table width="600" border="0" align="center">
  45.                 <tr>
  46.                     <td height="10" class="module-header">
  47.                         &nbsp;<img src="images/arrow.gif"> Verkoopstatus
  48.                     </td>
  49.                 </tr>
  50.                 <tr>
  51.                     <td class="module-content">
  52.                         <p><b>Verkoopstatus nieuwbouw project 1:</b></p>
  53.                         <div style="height: 515; width: 600;">
  54.                             <div style="margin: 0px; height: 515px; width: 600px;">
  55.                                 <p style="padding-top: 0px; margin-top: 0px;" align="center"><img alt="" src="verkoopstatus_project_1.jpg" /></p>
  56.                             </div>
  57.                             <div style="margin-top: -515px; position: absolute;">
  58.                                 <div style="position: absolute; border: 1px solid black; margin-left: 5px; margin-top: 5px; height: 30px; width: 80px; background-color: #2E2EFE"><p style="padding-top: 0px; margin-top: 0px; font-family:arial; font-size:12px;" align="center"><strong>Nog niet in verkoop</strong></p></div>
  59.                                 <div style="position: absolute; border: 1px solid black; margin-left: 5px; margin-top: 35px; height: 30px; width: 80px; background-color: #3E8028"><p style="padding-top: 0px; margin-top: 0px; font-family:arial; font-size:12px;" align="center"><strong>Nog vrij</strong></p></div>
  60.                                 <div style="position: absolute; border: 1px solid black; margin-left: 5px; margin-top: 65px; height: 30px; width: 80px; background-color: #F26A20"><p style="padding-top: 0px; margin-top: 0px; font-family:arial; font-size:12px;" align="center"><strong>Optie</strong></p></div>
  61.                                 <div style="position: absolute; border: 1px solid black; margin-left: 5px; margin-top: 95px; height: 30px; width: 80px; background-color: #F1F121"><p style="padding-top: 0px; margin-top: 0px; font-family:arial; font-size:12px;" align="center"><strong>Verkocht</strong></p></div>
  62.                                 <?php //showHome('1'); ?>
  63.                             </div>
  64.                         </div>
  65.                         <p><b>Verkoopstatus nieuwbouw project 2:</b></p>
  66.                         <div style="height: 280; width: 600;">
  67.                             <div style="margin: 0px; height: 280px; width: 600px;">
  68.                                 <p style="padding-top: 0px; margin-top: 0px;" align="center"><img alt="" src="verkoopstatus_project_2.jpg" /></p>
  69.                             </div>
  70.                             <div style="margin-top: -280px; position: absolute;">
  71.                                 <div style="position: absolute; border: 1px solid black; margin-left: 5px; margin-top: 5px; height: 30px; width: 80px; background-color: #2E2EFE"><p style="padding-top: 0px; margin-top: 0px; font-family:arial; font-size:12px;" align="center"><strong>Nog niet in verkoop</strong></p></div>
  72.                                 <div style="position: absolute; border: 1px solid black; margin-left: 5px; margin-top: 35px; height: 30px; width: 80px; background-color: #3E8028"><p style="padding-top: 0px; margin-top: 0px; font-family:arial; font-size:12px;" align="center"><strong>Nog vrij</strong></p></div>
  73.                                 <div style="position: absolute; border: 1px solid black; margin-left: 5px; margin-top: 65px; height: 30px; width: 80px; background-color: #F26A20"><p style="padding-top: 0px; margin-top: 0px; font-family:arial; font-size:12px;" align="center"><strong>Optie</strong></p></div>
  74.                                 <div style="position: absolute; border: 1px solid black; margin-left: 5px; margin-top: 95px; height: 30px; width: 80px; background-color: #F1F121"><p style="padding-top: 0px; margin-top: 0px; font-family:arial; font-size:12px;" align="center"><strong>Verkocht</strong></p></div>
  75.                                 <?php //showHome('2'); ?>
  76.                             </div>
  77.                         </div>
  78.                     </td>
  79.                 </tr>
  80.             </table>
  81.         </td>
  82.     </tr>
  83. </table>
  84. </div><!-- end .wrap -->
  85.  
  86. <?php
  87.  
  88. //}
  89. /*else
  90. {
  91.     echo "<script>top.location.href='../index.php';</script>";
  92. }*/
  93.  
  94. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement