Advertisement
Guest User

Untitled

a guest
Jun 18th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.73 KB | None | 0 0
  1. <?php
  2. $c = 0;
  3.  
  4. $dbHost = "localhost"; //strežnik
  5. $dbUser = "soriyyx"; //uporabniško ime
  6. $dbPass = "niggaz"; //geslo
  7. $dbDatabase = "denar"; //database
  8.  
  9. $db = mysql_connect("$dbHost", "$dbUser", "$dbPass") or die ("Error connecting to database.");
  10. mysql_select_db("$dbDatabase", $db) or die ("Couldn't select the database.");
  11. ?>
  12. <html>
  13. <head>
  14. <title>Applications - Galinium Software</title>
  15. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  16. <style type="text/css">
  17. body {
  18.     background-image: url(images/ozadje.png);
  19.     background-repeat: repeat;
  20. }
  21. #naslov {
  22.     font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
  23.     font-size: 18px;
  24.     color: #FFF;
  25. }
  26. .telo {
  27.     background-image: url(images/body.png);
  28.     background-repeat: repeat;
  29.     width: 702px;
  30.     padding-top: 10px;
  31.     padding-left: 10px;
  32.     text-align: center;
  33. }
  34. .meni {
  35.     background-image: url(images/menu.png);
  36.     height: 36px;
  37.     width: 702px;
  38.     text-align: center;
  39.     vertical-align: middle;
  40. }
  41. .foot {
  42.     background-image: url(images/foot.png);
  43.     height: 31px;
  44.     width: 702px;
  45.     text-align: center;
  46.     vertical-align: middle;
  47. }
  48. body,td,th {
  49.     font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
  50.     color: #FFF;
  51.     font-size: 16px;
  52. }
  53. .even {
  54.     border:none;
  55.     height:70px;
  56.     background-image: url(images/even.png);
  57. }
  58. .odd {
  59.     border:none;
  60.     height:70px;
  61.     background-image: url(images/odd.png);
  62. }
  63. </style>
  64. <script type="text/javascript">
  65. <!--
  66. function MM_swapImgRestore() { //v3.0
  67.   var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
  68. }
  69. function MM_preloadImages() { //v3.0
  70.   var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  71.     var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  72.     if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
  73. }
  74.  
  75. function MM_findObj(n, d) { //v4.01
  76.   var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  77.     d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  78.   if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  79.   for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  80.   if(!x && d.getElementById) x=d.getElementById(n); return x;
  81. }
  82.  
  83. function MM_swapImage() { //v3.0
  84.   var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
  85.    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
  86. }
  87. //-->
  88. </script>
  89. </head>
  90. <body bgcolor="#FFFFFF" onload="MM_preloadImages('images/home_h.png','images/app-h.png','images/games_h.png','images/down_h.png','images/contact_h.png')">
  91. <div align="center">
  92. <table id="Table_01" width="900" border="0" cellpadding="0" cellspacing="0">
  93.   <tr>
  94.     <td width="99" height="581" rowspan="7"><img src="images/spacer.gif" width="99" height="581" alt="" /></td>
  95.     <td><img id="index_02" src="images/logo.png" width="301" border="0" height="149" alt="" /></td>
  96.     <td width="500" height="149" colspan="2"><img src="images/spacer.gif" width="500" height="149" alt="" /></td>
  97.   </tr>
  98.   <tr>
  99.     <td colspan="2" class="meni"><a href="index.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('home','','images/home:h.png',1)"><img src="images/home.png" name="home" width="130" height="30" border="0" id="home" /></a><a href="app.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('app','','images/app.png',1)"><img src="images/app-h.png" name="app" width="130" height="30" border="0" id="app" /></a><a href="games.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('games','','images/games_h.png',1)"><img src="images/games.png" name="games" width="130" height="30" border="0" id="games" /></a><a href="download.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('download','','images/down_h.png',1)"><img src="images/down.png" name="download" width="130" height="30" border="0" id="download" /></a><a href="contact.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('contact','','images/contact_h.png',1)"><img src="images/contact.png" name="contact" width="130" height="30" border="0" id="contact" /></a></td>
  100.     <td width="99" height="432" rowspan="6"><img src="images/spacer.gif" width="99" height="432" alt="" /></td>
  101.   </tr>
  102.   <tr>
  103.     <td colspan="2"><img id="index_06" src="images/menu1.png" width="702" height="5" alt="" /></td>
  104.   </tr>
  105.   <tr>
  106.     <td colspan="2" class="telo" id="naslov">
  107.           <p>Applications</p>
  108.           <table width="600" align="center" border="0">
  109. <?php
  110. $sql = "SELECT * FROM app";
  111. $result = mysql_query($sql);
  112. $num = mysql_numrows($result);
  113.  
  114. $i=0;
  115. while ($i < $num) {
  116.  
  117. $picture = mysql_result($result,$i,"slika");
  118. $name = mysql_result($result,$i,"ime");
  119. $desc = mysql_result($result,$i,"opis");
  120. $more = mysql_result($result,$i,"vec");
  121. $down = mysql_result($result,$i,"prenos");
  122.  
  123. ?>
  124.  
  125. <tr valign="top" class="<?=($c++%2==1) ? 'odd' : 'even' ?>">
  126. <td><?php echo $picture; ?></td>
  127. <td><?php echo $name; ?></td>
  128. <td><?php echo $desc; ?></td>
  129. <td><?php echo $more; ?></td>
  130. <td><?php echo $down; ?></td>
  131. </tr>
  132.  
  133.  
  134. <?php
  135. $i++;
  136. }
  137. ?>
  138. </table><br />
  139. </td>
  140.   </tr>
  141.   <tr>
  142.     <td colspan="2"><img id="index_08" src="images/foot1.png" width="702" height="5" alt="" /></td>
  143.   </tr>
  144.   <tr>
  145.     <td colspan="2" class="foot"><img src="images/copyrights.png" width="650" height="30" /></td>
  146.   </tr>
  147.   <tr></tr>
  148.   <tr>
  149.     <td width="70"><img src="images/spacer.gif" width="99" height="1" alt="" /></td>
  150.     <td><img src="images/spacer.gif" width="301" height="1" alt="" /></td>
  151.     <td><img src="images/spacer.gif" width="401" height="1" alt="" /></td>
  152.     <td><img src="images/spacer.gif" width="99" height="1" alt="" /></td>
  153.   </tr>
  154. </table>
  155. </div>
  156. </body>
  157. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement