@ 2018-02-11T19:06:25Z <?php
// set up DB
$conn = mysql_connect("localhost", "root", "root");
mysql_select_db("catweb_database");
// set your db encoding -- for ascent chars (if required)
mysql_query("SET NAMES 'utf8'");
// include and create object
include("inc/jqgrid_dist.php");
session_start();
$id_user = $_SESSION['id_user'];
$col = array();
$col["title"] = "Key";
$col["name"] = "id_cliente";
$col["sortable"] = false;
$col["search"] = false;
$col["editable"] = false;
$col["hidden"] = true;
$cols[] = $col;
$col = array();
$col["title"] = "Id Utente";
$col["name"] = "IDUTENTE";
$col["sortable"] = false; // this column is not sortable
$col["search"] = false; // this column is not searchable
$col["editable"] = true;
$col["editoptions"] = array("value"=>$id_user);
$col["hidden"] = true;
$cols[] = $col;
$col = array();
$col["title"] = "Ragione Sociale";
$col["name"] = "ragione_sociale";
# $col["width"] = "300"; // not specifying width will expand to fill space
$col["sortable"] = true; // this column is not sortable
$col["search"] = true; // this column is not searchable
$col["editrules"] = array("required"=>true);
$col["editable"] = true;
$cols[] = $col;
$col = array();
$col["title"] = "Recapito";
$col["name"] = "recapito";
# $col["width"] = "300"; // not specifying width will expand to fill space
$col["sortable"] = false; // this column is not sortable
$col["search"] = false; // this column is not searchable
$col["editrules"] = array("required"=>true);
$col["editable"] = true;
$cols[] = $col;
$col = array();
$col["title"] = "e-Mail";
$col["name"] = "email";
# $col["width"] = "300"; // not specifying width will expand to fill space
$col["sortable"] = false; // this column is not sortable
$col["search"] = false; // this column is not searchable
$col["editable"] = true;
$cols[] = $col;
$col = array();
$col["title"] = "Indirizzo";
$col["name"] = "indirizzo";
# $col["width"] = "300"; // not specifying width will expand to fill space
$col["sortable"] = false; // this column is not sortable
$col["search"] = false; // this column is not searchable
$col["editable"] = true;
$col["edittype"] = "textarea";
$cols[] = $col;
$col = array();
$col["title"] = "Citta'";
$col["name"] = "citta";
# $col["width"] = "300"; // not specifying width will expand to fill space
$col["sortable"] = false; // this column is not sortable
$col["search"] = false; // this column is not searchable
$col["editable"] = true;
$cols[] = $col;
$g = new jqgrid();
// set few params
$grid["caption"] = "Elenco Clienti";
$grid["multiselect"] = false;
$grid["autowidth"] = true; // expand grid to screen width
$g->set_options($grid);
$g->set_actions(array(
"add"=>true,
"edit"=>true,
"delete"=>true,
"rowactions"=>true,
"export"=>false,
"autofilter" => true,
"search" => "simple",
//"inlineadd" => true,
"showhidecolumns" => false
)
);
// set database table for CRUD operations
$g->table = "clienti";
// subqueries are also supported now (v1.2)
$g->select_command = "SELECT * FROM clienti WHERE idUtente = $id_user";
// pass the cooked columns to grid
$g->set_columns($cols);
// render grid
$out = $g->render("Clienti");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" media="screen" href="js/themes/redmond/jquery-ui.custom.css"></link>
<link rel="stylesheet" type="text/css" media="screen" href="js/jqgrid/css/ui.jqgrid.css"></link>
<script src="js/jquery.min.js" type="text/javascript"></script>
<script src="js/jqgrid/js/i18n/grid.locale-it.js" type="text/javascript"></script>
<script src="js/jqgrid/js/jquery.jqGrid.min.js" type="text/javascript"></script>
<script src="js/themes/jquery-ui.custom.min.js" type="text/javascript"></script>
</head>
<body>
<div style="margin:10px">
<center><input name="" type="image" src="images/elenco_clienti.png" />
</center>
<hr />
<div id="code" align="left"><a href="startpage.php" style="text-decoration: none;"><input value="Home" type="button"></a>
<id="code" align="left"><a href="riparazioni.php" style="text-decoration: none;"><input value="Schede in Lavorazione" type="button"></a>
<id="code" align="left"><a href="schederivenditori.php" style="text-decoration: none;"><input value="Schede CAT" type="button"></a></div>
<hr />
<?php echo $out?>
</div>
</body>
</html>
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for git.master , git.master_jit , rfc.property-hooks Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /in/vvenj:4
Stack trace:
#0 {main}
thrown in /in/vvenj on line 4
Process exited with code 255 . This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.
Active branches Archived branches Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page
preferences:dark mode live preview
50.88 ms | 401 KiB | 8 Q