Esempio n. 1
0
 /**
  * Index Page for this controller.
  *
  * Maps to the following URL
  * 		http://example.com/index.php/welcome
  *	- or -
  * 		http://example.com/index.php/welcome/index
  *	- or -
  * Since this controller is set as the default controller in
  * config/routes.php, it's displayed at http://example.com/
  *
  * So any other public methods not prefixed with an underscore will
  * map to /index.php/welcome/<method_name>
  * @see https://codeigniter.com/user_guide/general/urls.html
  */
 public function index()
 {
     $this->load->view('homepage');
     stock();
     players();
 }
Esempio n. 2
0
function add_task($task)
{
    $tasks = unstock(file_read(DATA_FILE));
    $tasks[] = $task;
    file_append(DATA_FILE, stock($tasks), false);
}
Esempio n. 3
0
<?php

include "mantenedor.php";
$fac = $_GET['fac'];
$cod = $_GET['cod'];
session_name("factura");
session_start();
$_SESSION['codigoEditado'] = $cod;
$max = stock($cod);
?>
<form action="editaFactura.php" method="POST" name="edicion" id="edicion">
    <table align="center">
        <tr>
            <td>
                <label>PRODUCTO</label>
            </td>
            <td>
            </td>
            <td>
                <label>Nueva Cantidad=</label>
            </td>
            <td>
                <?php 
echo '<input name="cantidad" id="cantidad" type="number" min="1" max="' . $max . '" required>';
?>
                
            </td>
            <td>
                <input type="submit" value="CAMBIAR" href="editaFactura.php?">
            </td>
        </tr>
Esempio n. 4
0
$end_url = ".json";
$commands = ["stock", "update"];
$incoming = strtolower($_POST["Body"]);
$outgoing;
$command = "";
$parameters = "";
if (gettype(strpos($incoming, " ")) != "boolean") {
    $command = substr($incoming, 0, strpos($incoming, " "));
    $parameters = substr($incoming, strpos($incoming, " ") + 1);
} else {
    $command = $incoming;
    $parameters = "";
}
switch ($command) {
    case $commands[0]:
        $outgoing = stock($parameters);
        break;
    case $commands[1]:
        $outgoing = update($parameters);
        break;
    default:
        $outgoing = notify_request($command);
        break;
}
header("content-type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
?>
<Response>
    <Message><?php 
echo $outgoing;
?>
Esempio n. 5
0
                <!-- /.sidebar -->
            </aside>

            <!-- Right side column. Contains the navbar and content of the page -->
            <aside class="right-side">
                <!-- Content Header (Page header) -->
                <section class="content-header">
                    <h1>
                        Tableau de bord
                    </h1>
                </section>

                <!-- Main content -->
                <section class="content">
                    <?php 
echo stock();
?>
                </section><!-- /.content -->
            </aside><!-- /.right-side -->
        </div><!-- ./wrapper -->

        <!-- add new calendar event modal -->


        <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
        <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js" type="text/javascript"></script>
        <script src="//code.jquery.com/ui/1.11.1/jquery-ui.min.js" type="text/javascript"></script>
        <!-- Morris.js charts -->
        <script src="//cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
        <script src="./AdminLTE/js/plugins/morris/morris.min.js" type="text/javascript"></script>
        <!-- Sparkline -->
Esempio n. 6
0
<?php

$results = stock($keywords);
$i = 1;
$reply = array();
$quote = $results->quote;
$msg = $quote->symbol . ' - ' . $quote->LastTradePriceOnly . ' - ' . $quote->Change . ' - ' . $quote->PercentChange;
$reply[] = $msg;
print_sms_reply($reply);
function stock($symbol)
{
    $yelpql = "\n\tUSE 'http://www.datatables.org/yahoo/finance/yahoo.finance.quotes.xml' AS yahoo.finance.quotes;select * from yahoo.finance.quotes where symbol in ('{$symbol}')";
    $result = getResultFromYQL($yelpql);
    return $result->query->results;
}
/**
 * @ignore
 */
function Control($dtaccid, $ctaccid, $refnum, $day, $mon, $year)
{
    # Check if its not customer control
    if (isDebtors($dtaccid)) {
        return debtors("dt", $ctaccid, $refnum, $day, $mon, $year);
    }
    if (isDebtors($ctaccid)) {
        return debtors("ct", $dtaccid, $refnum, $day, $mon, $year);
    }
    if (isStock($ctaccid)) {
        return stock("ct", $dtaccid, $refnum, $day, $mon, $year);
    }
    # Check if its not creditors control
    if (isCreditors($dtaccid)) {
        return creditors("dt", $ctaccid, $refnum, $day, $mon, $year);
    }
    if (isCreditors($ctaccid)) {
        return creditors("ct", $dtaccid, $refnum, $day, $mon, $year);
    }
    if (isStock($dtaccid)) {
        return stock("dt", $ctaccid, $refnum, $day, $mon, $year);
    }
}