0
<?php
session_start();
error_reporting(0);
include "timeout.php";

if($_SESSION[login]==1){
    if(!cek_login()){
        $_SESSION[login] = 0;
    }
}
if($_SESSION[login]==0){
  header('location:logout.php');
}
else{
if (empty($_SESSION['username']) AND empty($_SESSION['passuser']) AND $_SESSION['login']==0){
  echo "<link href='style.css' rel='stylesheet' type='text/css'>
 <center>Untuk mengakses modul, Anda harus login <br>";
  echo "<a href=index.php><b>LOGIN</b></a></center>";
}
else{
?>
<html>
<head>
<title></title>
<script language="javascript" type="text/javascript">
    tinyMCE_GZ.init({
    plugins : 'style,layer,table,save,advhr,advimage, ...',
        themes  : 'simple,advanced',
        languages : 'en',
        disk_cache : true,
        debug : false
});
</script>
<script language="javascript" type="text/javascript"
src="../tinymcpuk/tiny_mce_src.js"></script>
<script type="text/javascript">
tinyMCE.init({
        mode : "textareas",
        theme : "advanced",
        plugins : "table,youtube,advhr,advimage,advlink,emotions,flash,searchreplace,paste,directionality,noneditable,contextmenu",
        theme_advanced_buttons1_add : "fontselect,fontsizeselect",
        theme_advanced_buttons2_add : "separator,preview,zoom,separator,forecolor,backcolor,liststyle",
        theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator",
        theme_advanced_buttons3_add_before : "tablecontrols,separator,youtube,separator",
        theme_advanced_buttons3_add : "emotions,flash",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_statusbar_location : "bottom",
        extended_valid_elements : "hr[class|width|size|noshade]",
        file_browser_callback : "fileBrowserCallBack",
        paste_use_dialog : false,
        theme_advanced_resizing : true,
        theme_advanced_resize_horizontal : false,
        theme_advanced_link_targets : "_something=My somthing;_something2=My somthing2;_something3=My somthing3;",
        apply_source_formatting : true
});

    function fileBrowserCallBack(field_name, url, type, win) {
        var connector = "../../filemanager/browser.html?Connector=connectors/php/connector.php";
        var enableAutoTypeSelection = true;

        var cType;
        tinymcpuk_field = field_name;
        tinymcpuk = win;

        switch (type) {
            case "image":
                cType = "Image";
                break;
            case "flash":
                cType = "Flash";
                break;
            case "file":
                cType = "File";
                break;
        }

        if (enableAutoTypeSelection && cType) {
            connector += "&Type=" + cType;
        }

        window.open(connector, "tinymcpuk", "modal,width=600,height=400");
    }
</script>
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function disableRightClick()
{
 alert("sorry can't right click");
 return false;
 }
 </script>
</head>

<body oncontextmenu= "return disableRightClick();">

<?php if ($_SESSION['leveluser']=='user'){ ?>
<div id="header">
    <div id="menu">
      <ul>
        <li><a href='?rajaampat'=info><img src="icon/globe.ico" border="0px" width="12px" height="13px" /> Home</a></li>
        <?php include "menu.php"; ?>
        <li><a href=logout.php><img src="icon/globe.ico" border="0px" width="12px" height="13px" /> Logout</a></li>
      </ul>
        <p>&nbsp;</p>
    </div>

  <div id="content">
        <?php include "content.php"; ?>
  </div>
  </div>
<?php }elseif ($_SESSION['leveluser']=='admin'){ ?>
<div id="header">
    <div id="menu">
      <ul>
        <li><a href='?rajaampat'=info><img src="icon/globe.ico" border="0px" width="12px" height="13px" /> Home</a></li>
        <?php include "menu2.php"; ?>
        <li><a href=logout.php><img src="icon/globe.ico" border="0px" width="12px" height="13px" /> Logout</a></li>
      </ul>
        <p>&nbsp;</p>
    </div>

  <div id="content">
        <?php include "content2.php"; ?>
  </div>
  </div>
<?php }else { ?>
    <p><b>MAAF ANDA HARUS LOG IN do e</b></p>
<?php } ?> 


<div id="footer">
            Copyright &copy; 2014 Kominfo Raja Ampat All rights reserved.
        </div>
</body>
</html>
<?php
}
?>

already tried many things,

ive scanned this code but got nothing

is it the php syntax or something??

i tried closed any unclosed syntax but still get this error :

Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\WEB RAJA AMPAT\homedir\public_html\myadmin\administrator\media.php on line 139

brombeer
  • 8,716
  • 5
  • 21
  • 27
Quirky
  • 3
  • 3
  • one curly braces are opened, you need to add } – Sakezzz Jul 11 '18 at 06:56
  • You will find debugging to be much simpler if you practice basic tabbing and group your custom javascripts together. Also, you should be checking that the `login` key "exists" before processing an expected value (to avoid generating _Notices_). – mickmackusa Jul 11 '18 at 08:41

0 Answers0