geovannefarell

profilkandidat

Oct 28th, 2012
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 12.36 KB | None | 0 0
  1. <?php
  2.     if (!session_start()){
  3.        
  4.     session_start();
  5.     }
  6. ?>
  7. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  8. <html xmlns="http://www.w3.org/1999/xhtml">
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  11. <?php
  12.     $adminlogin =$_SESSION['valid_username'];
  13.    
  14.     if ($adminlogin !=""){
  15.     ?>
  16. <title>E-Voting System</title>
  17. <link rel="stylesheet" href="../css/screen.css" type="text/css" media="screen" title="default" />
  18. <!--[if IE]>
  19. <link rel="stylesheet" media="all" type="text/css" href="../css/pro_dropline_ie.css" />
  20. <![endif]-->
  21.  
  22. <!--  jquery core -->
  23. <script src="../js/jquery/jquery-1.4.1.min.js" type="text/javascript"></script>
  24.  
  25. <!--  checkbox styling script -->
  26. <script src="../js/jquery/ui.core.js" type="text/javascript"></script>
  27. <script src="../js/jquery/ui.checkbox.js" type="text/javascript"></script>
  28. <script src="../js/jquery/jquery.bind.js" type="text/javascript"></script>
  29. <script type="text/javascript">
  30. $(function(){
  31.     $('input').checkBox();
  32.     $('#toggle-all').click(function(){
  33.     $('#toggle-all').toggleClass('toggle-checked');
  34.     $('#mainform input[type=checkbox]').checkBox('toggle');
  35.     return false;
  36.     });
  37. });
  38. </script>  
  39.  
  40. <![if !IE 7]>
  41.  
  42. <!--  styled select box script version 1 -->
  43. <script src="../js/jquery/jquery.selectbox-0.5.js" type="text/javascript"></script>
  44. <script type="text/javascript">
  45. $(document).ready(function() {
  46.     $('.styledselect').selectbox({ inputClass: "selectbox_styled" });
  47. });
  48. </script>
  49.  
  50.  
  51. <![endif]>
  52.  
  53. <!--  styled select box script version 2 -->
  54. <script src="../js/jquery/jquery.selectbox-0.5_style_2.js" type="text/javascript"></script>
  55. <script type="text/javascript">
  56. $(document).ready(function() {
  57.     $('.styledselect_form_1').selectbox({ inputClass: "styledselect_form_1" });
  58.     $('.styledselect_form_2').selectbox({ inputClass: "styledselect_form_2" });
  59. });
  60. </script>
  61.  
  62. <!--  styled select box script version 3 -->
  63. <script src="../js/jquery/jquery.selectbox-0.5_style_2.js" type="text/javascript"></script>
  64. <script type="text/javascript">
  65. $(document).ready(function() {
  66.     $('.styledselect_pages').selectbox({ inputClass: "styledselect_pages" });
  67. });
  68. </script>
  69.  
  70. <!--  styled file upload script -->
  71. <script src="../js/jquery/jquery.filestyle.js" type="text/javascript"></script>
  72. <script type="text/javascript" charset="utf-8">
  73.   $(function() {
  74.       $("input.file_1").filestyle({
  75.           image: "../images/forms/choose-file.gif",
  76.           imageheight : 21,
  77.           imagewidth : 78,
  78.           width : 310
  79.       });
  80.   });
  81. </script>
  82.  
  83. <!-- Custom jquery scripts -->
  84. <script src="../js/jquery/custom_jquery.js" type="text/javascript"></script>
  85.  
  86. <!-- Tooltips -->
  87. <script src="../js/jquery/jquery.tooltip.js" type="text/javascript"></script>
  88. <script src="../js/jquery/jquery.dimensions.js" type="text/javascript"></script>
  89. <script type="text/javascript">
  90. $(function() {
  91.     $('a.info-tooltip ').tooltip({
  92.         track: true,
  93.         delay: 0,
  94.         fixPNG: true,
  95.         showURL: false,
  96.         showBody: " - ",
  97.         top: -35,
  98.         left: 5
  99.     });
  100. });
  101. </script>
  102.  
  103.  
  104. <!--  date picker script -->
  105. <link rel="stylesheet" href="../css/datePicker.css" type="text/css" />
  106. <script src="../js/jquery/date.js" type="text/javascript"></script>
  107. <script src="../js/jquery/jquery.datePicker.js" type="text/javascript"></script>
  108. <script type="text/javascript" charset="utf-8">
  109.         $(function()
  110. {
  111.  
  112. // initialise the "Select date" link
  113. $('#date-pick')
  114.     .datePicker(
  115.         // associate the link with a date picker
  116.         {
  117.             createButton:false,
  118.             startDate:'01/01/2005',
  119.             endDate:'31/12/2020'
  120.         }
  121.     ).bind(
  122.         // when the link is clicked display the date picker
  123.         'click',
  124.         function()
  125.         {
  126.             updateSelects($(this).dpGetSelected()[0]);
  127.             $(this).dpDisplay();
  128.             return false;
  129.         }
  130.     ).bind(
  131.         // when a date is selected update the SELECTs
  132.         'dateSelected',
  133.         function(e, selectedDate, $td, state)
  134.         {
  135.             updateSelects(selectedDate);
  136.         }
  137.     ).bind(
  138.         'dpClosed',
  139.         function(e, selected)
  140.         {
  141.             updateSelects(selected[0]);
  142.         }
  143.     );
  144.    
  145. var updateSelects = function (selectedDate)
  146. {
  147.     var selectedDate = new Date(selectedDate);
  148.     $('#d option[value=' + selectedDate.getDate() + ']').attr('selected', 'selected');
  149.     $('#m option[value=' + (selectedDate.getMonth()+1) + ']').attr('selected', 'selected');
  150.     $('#y option[value=' + (selectedDate.getFullYear()) + ']').attr('selected', 'selected');
  151. }
  152. // listen for when the selects are changed and update the picker
  153. $('#d, #m, #y')
  154.     .bind(
  155.         'change',
  156.         function()
  157.         {
  158.             var d = new Date(
  159.                         $('#y').val(),
  160.                         $('#m').val()-1,
  161.                         $('#d').val()
  162.                     );
  163.             $('#date-pick').dpSetSelected(d.asString());
  164.         }
  165.     );
  166.  
  167. // default the position of the selects to today
  168. var today = new Date();
  169. updateSelects(today.getTime());
  170.  
  171. // and update the datePicker to reflect it...
  172. $('#d').trigger('change');
  173. });
  174. </script>
  175.  
  176. <!-- MUST BE THE LAST SCRIPT IN <HEAD></HEAD></HEAD> png fix -->
  177. <script src="../js/jquery/jquery.pngFix.pack.js" type="text/javascript"></script>
  178. <script type="text/javascript">
  179. $(document).ready(function(){
  180. $(document).pngFix( );
  181. });
  182. </script>
  183. </head>
  184. <body>
  185. <!-- Start: page-top-outer -->
  186. <div id="page-top-outer">    
  187.  
  188. <!-- Start: page-top -->
  189. <div id="page-top">
  190.  
  191.     <!-- start logo -->
  192.     <div id="logo">
  193.     <a href=""><img src="../images/shared/logo.png" width="156" height="40" alt="" /></a>
  194.     </div>
  195.     <!-- end logo -->
  196.    
  197.    
  198.     <div class="clear"></div>
  199.  
  200. </div>
  201. <!-- End: page-top -->
  202.  
  203. </div>
  204. <!-- End: page-top-outer -->
  205.    
  206. <div class="clear">&nbsp;</div>
  207.  
  208. <!--  start nav-outer-repeat................................................................................................. START -->
  209. <div class="nav-outer-repeat">
  210. <!--  start nav-outer -->
  211. <div class="nav-outer">
  212.  
  213.         <!-- start nav-right -->
  214.         <div id="nav-right">
  215.        
  216.            
  217.             <div class="nav-divider">&nbsp;</div>
  218.             <a href="../logout.php" id="logout"><img src="../images/shared/nav/nav_logout.gif" width="64" height="14" alt="" /></a>
  219.             <div class="clear">&nbsp;</div>
  220.         </div>
  221.         <!-- end nav-right -->
  222.  
  223.  
  224.         <!--  start nav -->
  225.         <div class="nav">
  226.         <div class="table">
  227.         <ul class="select"><li><a href="../index.php"><b>Beranda</b><!--[if IE 7]><!--></a><!--<![endif]-->
  228.         </li>
  229.         </ul>
  230.        
  231.         <div class="nav-divider">&nbsp;</div>
  232.         <ul class="select"><li><a href=""><b>Himpunan Mahasiswa</b><!--[if IE 7]><!--></a><!--<![endif]-->
  233.         <!--[if lte IE 6]><table><tr><td><![endif]-->
  234.         <div class="select_sub">
  235.             <ul class="sub">
  236.             <li><a href="../kk/kk.php">Kesejahteraan Keluarga</a></li>
  237.             <li><a href="../elektro/elektro.php">T. Elektro</a></li>
  238.             <li><a href="../elektronika/elektronika.php">T.Elektronika</a></li>
  239.             <li><a href="../mesin/mesin.php">T.Mesin</a></li>
  240.             <li><a href="../otomotif/otomotif.php">T.Otomotif</a></li>
  241.             <li><a href="../tambang/tambang.php">T.Pertambangan</a></li>
  242.             <li><a href="../sipil/sipil.php">T.Sipil</a></li>
  243.             </ul>
  244.         </div>
  245.         <!--[if lte IE 6]></td></tr></table></a><![endif]-->
  246.         </li>
  247.         </ul>
  248.        
  249.         <div class="nav-divider">&nbsp;</div>
  250.                            
  251.         <ul class="select"><li><a href="bem.php"><b>Badan Eksekutif Mahasiswa</b><!--[if IE 7]><!--></a></li></ul>
  252.                
  253.         <div class="nav-divider">&nbsp;</div>
  254.         <ul class="select"><li><a href=""><b>Setting</b><!--[if IE 7]><!--></a><!--<![endif]-->
  255.         <!--[if lte IE 6]><table><tr><td><![endif]-->
  256.         <div class="select_sub">
  257.             <ul class="sub">
  258.             <li><a href="../setting/form_waktu.php">Waktu Pemilihan</a></li>
  259.             <li><a href="../setting/laporan.php">Laporan Hasil Pemilihan</a></li>
  260.             <li><a href="../setting/clearing.php">Pembersihan Data</a></li>
  261.             </ul>
  262.         </div>
  263.         <!--[if lte IE 6]></td></tr></table></a><![endif]-->
  264.         </li>
  265.         </ul>
  266.         <div class="nav-divider">&nbsp;</div>
  267.         <div class="clear"></div>
  268.         </div>
  269.         <div class="clear"></div>
  270.         </div>
  271.         <!--  start nav -->
  272.  
  273. </div>
  274. <div class="clear"></div>
  275. <!--  start nav-outer -->
  276. </div>
  277. <!--  start nav-outer-repeat................................................... END -->
  278.  
  279.   <div class="clear"></div>
  280.  
  281. <!-- start content-outer ........................................................................................................................START -->
  282. <div id="content-outer">
  283. <!-- start content -->
  284. <div id="content">
  285.  
  286.    
  287.  
  288.     <table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
  289.     <tr>
  290.         <th rowspan="3" class="sized"><img src="../images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
  291.         <th class="topleft"></th>
  292.         <td id="tbl-border-top">&nbsp;</td>
  293.         <th class="topright"></th>
  294.         <th rowspan="3" class="sized"><img src="../images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
  295.     </tr>
  296.     <tr>
  297.         <td id="tbl-border-left"></td>
  298.         <td>
  299.         <!--  start content-table-inner ...................................................................... START -->
  300.         <div id="content-table-inner">
  301.        
  302.             <!--  start table-content  -->
  303.             <div id="table-content">
  304.            
  305.                 <center><h1>Profil Kandidat</h1><center><br /><br />
  306.                
  307.                 <center><a href="tambahkanprofil.php"><input type="submit" style="padding:6px;background:orange" value="Tambah Profil Kandidat" /></a><center><br><Br>
  308.          
  309.                 <!--  start product-table ..................................................................................... -->
  310.                 <form id="mainform" action="">
  311.                 <table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
  312.                 <tr>
  313.                    
  314.                     <th class="table-header-repeat line-left"><a>Nomor Urut</th>
  315.                     <th class="table-header-repeat line-left"><a>Periode</th>
  316.                     <th class="table-header-repeat line-left"><a>Motto</a></th>
  317.                     <th class="table-header-repeat line-left"><a>Visi</a></th>
  318.                     <th class="table-header-repeat line-left"><a>Misi</a></th>
  319.                     <th class="table-header-repeat line-left"><a>Foto Ketua</a></th>
  320.                     <th class="table-header-repeat line-left"><a>Foto Wakil</a></th>
  321.                     <th class="table-header-options line-left"><a>Options</a></th>
  322.                 </tr>
  323.  
  324. <?php
  325.  
  326. require('../qs_connection.php');
  327. $tahun = Date("Y");
  328. $query = "select * from tb_profil_bem ORDER BY 'tb_profil_bem', 'no_urut'  ASC";
  329. $result = mysql_query($query, $link);
  330. //$no = 0;
  331. while ($buff = mysql_fetch_array($result)){
  332. //$no++;
  333. ?>
  334.    
  335.                 <tr class="alternate-row">
  336.                    
  337.                     <td><?php echo $buff['no_urut']; ?></td>
  338.                     <td><?php echo $buff['periode']; ?></td>
  339.                     <td><?php echo $buff['moto']; ?></td>
  340.                     <td><?php echo $buff['visi']; ?></td>
  341.                     <td><?php echo $buff['misi']; ?></td>
  342.                     <td><img src="../../gambar/<?php echo $buff['foto_cln_kt'];?>" width="100" /></td>
  343.                     <td><img src="../../gambar/<?php echo $buff['foto_cln_wk'];?>" width="100" /></td>
  344.                     <td class="options-width">
  345.                     <a href="kandidat_edit_profil.php?id_profil=<?php echo $buff['id_profil']; ?>" title="Edit" class="icon-1 info-tooltip"></a>
  346.                     <a href="kandidat_hapus_profil.php?id_profil=<?php echo $buff['id_profil']; ?>" title="Delete" onClick="return confirm('Anda yakin?');" class="icon-2 info-tooltip"></a>
  347.                     </td>
  348.                 </tr>
  349.  
  350. <?php
  351. };
  352. mysql_close($link);
  353. ?>
  354.                 </table>
  355.                 <!--  end product-table................................... -->
  356.                 </form>
  357.  
  358.             </div>
  359.             <!--  end content-table  -->           
  360.            
  361.             <div class="clear"></div>
  362.          
  363.         </div>
  364.         <!--  end content-table-inner ............................................END  -->
  365.         </td>
  366.         <td id="tbl-border-right"></td>
  367.     </tr>
  368.     <tr>
  369.         <th class="sized bottomleft"></th>
  370.         <td id="tbl-border-bottom">&nbsp;</td>
  371.         <th class="sized bottomright"></th>
  372.     </tr>
  373.     </table>
  374.     <div class="clear">&nbsp;</div>
  375.  
  376. </div>
  377. <!--  end content -->
  378. <div class="clear">&nbsp;</div>
  379. </div>
  380. <!--  end content-outer........................................................END -->
  381.  
  382. <div class="clear">&nbsp;</div>
  383.    
  384. <!-- start footer -->        
  385. <div id="footer">
  386.     <!--  start footer-left -->
  387.     <div id="footer-left">
  388.    
  389.     Copyright : Fakultas Teknik by RPL. All rights reserved.</div>
  390.     <!--  end footer-left -->
  391.     <div class="clear">&nbsp;</div>
  392. </div>
  393. <!-- end footer -->
  394.  
  395. </body>
  396. </html>
  397.  
  398. <?php
  399. }else{
  400.     ?><script language="javascript">;
  401.     alert("Maaf, Anda tidak berhak mengakses halaman ini!!");
  402.     document.location="../login.php";
  403.     </script>
  404.     <?php
  405.        
  406. }
  407. ?>
Advertisement
Add Comment
Please, Sign In to add comment