예제 #1
0
<?php

//note: this example reloads the page on an ADD ROW because it allows file uploading
require_once '../preheader.php';
// <-- this include file MUST go first before any HTML/output
#the code for the class
include_once '../ajaxCRUD.class.php';
// <-- this include file MUST go first before any HTML/output
#create an instance of the class
$tblFriend = new ajaxCRUD("Friend", "tblFriend", "pkFriendID", "../");
?>
<!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

		<?php 
$tblFriend->insertHeader();
?>

		<!-- these js/css includes are ONLY to make the calendar widget work (fldDateMet);
			 these includes are not necessary for the class to work!! -->
		<link rel="stylesheet" href="includes/jquery.ui.all.css">
		<script src="includes/jquery.ui.core.js"></script>
		<!--script src="includes/jquery.ui.widget.js"></script-->
		<script src="includes/jquery.ui.datepicker.js"></script>
	</head>

<?php 
#change orientation (if desired/needed for large number of fields in a table)
예제 #2
0
<?php

require_once '../preheader.php';
// <-- this include file MUST go first before any HTML/output
#the code for the class
include '../ajaxCRUD.class.php';
// <-- this include file MUST go first before any HTML/output
#this one line of code is how you implement the class
########################################################
##
$tblDemo = new ajaxCRUD("Item", "tblDemo", "pkID", "../");
##
########################################################
## all that follows is setup configuration for your fields....
## full API reference material for all functions can be found here - http://ajaxcrud.com/api/
## note: many functions below are commented out (with //). note which ones are and which are not
#i can define a relationship to another table
#the 1st field is the fk in the table, the 2nd is the second table, the 3rd is the pk in the second table, the 4th is field i want to retrieve as the dropdown value
#http://ajaxcrud.com/api/index.php?id=defineRelationship
//$tblDemo->defineRelationship("fkID", "tblDemoRelationship", "pkID", "fldName", "fldSort DESC"); //use your own table - this table (tblDemoRelationship) not included in the installation script
#i don't want to visually show the primary key in the table
$tblDemo->omitPrimaryKey();
#the table fields have prefixes; i want to give the heading titles something more meaningful
$tblDemo->displayAs("fldField1", "Field1");
$tblDemo->displayAs("fldField2", "Field2");
$tblDemo->displayAs("fldCertainFields", "Valid Value Field");
$tblDemo->displayAs("fldLongField", "Long Field");
$tblDemo->displayAs("fldCheckbox", "Is Selected?");
#set the textarea height of the longer field (for editing/adding)
#http://ajaxcrud.com/api/index.php?id=setTextareaHeight
$tblDemo->setTextareaHeight('fldLongField', 150);
예제 #3
0
<?php 
include_once 'top_nav.php';
?>
</div>  <!--row-->   
<div class="row">   

<?php 
require_once 'preheader.php';
// <-- this include file MUST go first before any HTML/output
#the code for the class
include 'ajaxCRUD.class.php';
// <-- this include file MUST go first before any HTML/output
#this one line of code is how you implement the class
########################################################
##
$tblDemo = new ajaxCRUD("Show", "st_shows", "sh_id", "/");
##
########################################################
## all that follows is setup configuration for your fields....
## full API reference material for all functions can be found here - http://ajaxcrud.com/api/
## note: many functions below are commented out (with //). note which ones are and which are not
#i can define a relationship to another table
#the 1st field is the fk in the table, the 2nd is the second table, the 3rd is the pk in the second table, the 4th is field i want to retrieve as the dropdown value
#http://ajaxcrud.com/api/index.php?id=defineRelationship
//$tblDemo->defineRelationship("fkID", "tblDemoRelationship", "pkID", "fldName", "fldSort DESC"); //use your own table - this table (tblDemoRelationship) not included in the installation script
#i don't want to visually show the primary key in the table
$tblDemo->omitPrimaryKey();
#the table fields have prefixes; i want to give the heading titles something more meaningful
$tblDemo->displayAs("sh_title", "Show");
$tblDemo->displayAs("sh_venue", "Venue");
$tblDemo->displayAs("sh_time", "Time");
예제 #4
0
파일: index.php 프로젝트: BeckRobert/PHPmnk
<?php 
require_once 'preheader.php';
// ovaj include ide prvi prije  HTML/output
#the code for the class
include 'ajaxCRUD.class.php';
// ovaj include ide prvi prije  HTML/output
#this one line of code is how you implement the class
########################################################
##
$tblDemo = new ajaxCRUD("podatke", "podaci", "id", "");
##
########################################################
## all that follows is setup configuration for your fields....
## full API reference material for all functions can be found here - http://ajaxcrud.com/api/
## note: many functions below are commented out (with //). note which ones are and which are not
#i can define a relationship to another table
#the 1st field is the fk in the table, the 2nd is the second table, the 3rd is the pk in the second table, the 4th is field i want to retrieve as the dropdown value
#http://ajaxcrud.com/api/index.php?id=defineRelationship
//$tblDemo->defineRelationship("fkID", "tblDemoRelationship", "pkID", "fldName", "fldSort DESC"); //use your own table - this table (tblDemoRelationship) not included in the installation script
#i don't want to visually show the primary key in the table
$tblDemo->omitPrimaryKey();
$tblDemo->displayAs("stupac_x", "stupac x");
$tblDemo->displayAs("stupac_y", "stupac y");
$tblDemo->deleteText = "obrisi";
?>


<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
      <meta charset="utf-8" />
<?php

require_once 'include/preheader.php';
// <-- this include file MUST go first before any HTML/output
include 'include/ajaxCRUD.class.php';
// <-- this include file MUST go first before any HTML/output
$tblDemo = new ajaxCRUD("Autos", "autos", "id_autos", "");
$tblDemo->defineRelationship("id_tipo", "tipo", "id_tipo", "desc_tipo");
$tblDemo->defineRelationship("id_modelo", "modelo", "id_modelo", "desc_modelo");
$tblDemo->defineRelationship("id_marca", "marca", "id_marca", "desc_marca");
$tblDemo->omitPrimaryKey();
$tblDemo->displayAs("nombre_autos", "Nombre");
$tblDemo->displayAs("desc_autos", "Descripcion");
$tblDemo->displayAs("detalle_autos", "Especificaciones");
$tblDemo->displayAs("precio_autos", "Precio");
$tblDemo->displayAs("id_marca", "Marca");
$tblDemo->displayAs("id_tipo", "Tipo");
$tblDemo->displayAs("id_modelo", "Modelo");
$tblDemo->setTextareaHeight('detalle_autos', 150);
$tblDemo->addWhereClause("WHERE id_marca = 2 and id_tipo = 41");
$tblDemo->setLimit(30);
$tblDemo->showTable();
예제 #6
0
        }
        if ($fldDate != "0000-00-00" && strtotime($fldDate . " " . $fldTime) < time()) {
            $eventExpired = true;
        }
    } else {
        header("Location: events.php");
    }
}
$page_title = "Signup for Event: {$fldTitle} @ {$fldLocation}";
#the code for the class
include '../../ajaxCRUD.class.php';
if (!$eventID) {
    header("Location: events.php");
}
#Create an instance of the class
$tblEventAttendee = new ajaxCRUD("Person", "tblEventAttendee", "pkAttendeeID", "../ajaxcrud/");
$tblEventAttendee->doActionOnShowTable = false;
//this ensures showTable() does not call doAction; i do not want to do this because my onAdd callback function creates a cookie
$tblEventAttendee->omitPrimaryKey();
#Create custom display fields
//$tblEventAttendee->displayAs("pkAttendeeID","User ID");
$tblEventAttendee->displayAs("fldFirstName", "First Name");
$tblEventAttendee->displayAs("fldLastName", "Last Name");
$tblEventAttendee->displayAs("fldPhone", "Phone #");
$tblEventAttendee->displayAs("fldWillBeLate", "Will You Be Late?");
$tblEventAttendee->displayAs("fldTimeArriving", "Arrival Time");
$tblEventAttendee->displayAs("fldComments", "Comments/Other");
$tblEventAttendee->displayAs("fldIPAddress", "IPAddress");
$tblEventAttendee->omitFieldCompletely("fldIPAddress");
$tblEventAttendee->omitFieldCompletely("fkEventID");
$tblEventAttendee->omitFieldCompletely("fldPhone");
예제 #7
0
<?php

require_once 'include/preheader.php';
include 'include/ajaxCRUD.class.php';
$tblDemo = new ajaxCRUD("Marcas", "marca", "id_marca", "");
$tblDemo->omitPrimaryKey();
$tblDemo->displayAs("desc_marca", "Descripcion");
$tblDemo->setLimit(30);
$tblDemo->addAjaxFilterBoxAllFields();
$tblDemo->showTable();
예제 #8
0
                case 'todo':
                    $where = "WHERE checked = 0 ";
                    $limit = 10;
                    break;
                default:
                    $where = "";
                    $limit = 10;
                    break;
            }
        } else {
            $where = "";
            $limit = 10;
        }
    }
}
$tbl = new ajaxCRUD("點位", "point", "id");
//$tbl->omitPrimaryKey();
$tbl->disallowEdit("id");
//$tbl->turnOffAjaxAdd();
// $tbl->turnOffAjaxEditing();
if (!empty($where)) {
    $tbl->addWhereClause($where);
}
$tbl->setLimit($limit);
$tbl->omitField("owner");
$tbl->displayAs("name", "名稱");
$tbl->displayAs("alias", "別名");
$tbl->displayAs("type", "種類");
$tbl->formatFieldWithFunction('type', 'showIcon');
$tbl->displayAs("class", "等");
$tbl->displayAs("number", "號碼");
예제 #9
0
<?php

require_once 'include/preheader.php';
include 'include/ajaxCRUD.class.php';
$tblDemo = new ajaxCRUD("Tipo", "tipo", "id_tipo", "");
$tblDemo->omitPrimaryKey();
$tblDemo->displayAs("desc_tipo", "Descripcion");
$tblDemo->showTable();
예제 #10
0
$tblDemo->displayAs("fldCertainFields", "Pick List");
$tblDemo->displayAs("fldLongField", "Long Field");
$tblDemo->displayAs("fldCheckbox", "Is Selected?");
$tblDemo->setTextareaHeight('fldLongField', 100);
$allowableValues = array("Allowable Value1", "Allowable Value2", "Dropdown Value", "CRUD");
$tblDemo->defineAllowableValues("fldCertainFields", $allowableValues);
//set field fldCheckbox to be a checkbox
$tblDemo->defineCheckbox("fldCheckbox", "1", "0");
$tblDemo->setLimit(5);
$tblDemo->addAjaxFilterBox('fldField1');
$tblDemo->formatFieldWithFunction('fldField1', 'makeBlue');
$tblDemo->formatFieldWithFunction('fldField2', 'makeBold');
echo "<h2>Table tblDemo</h2>\n";
$tblDemo->showTable();
echo "<br /><hr ><br />\n";
$tblDemo2 = new ajaxCRUD("Item", "tblDemo2", "pkID");
$tblDemo2->omitPrimaryKey();
$tblDemo2->displayAs("fldField1", "Field1");
$tblDemo2->displayAs("fldField2", "Field2");
$tblDemo2->displayAs("fldCertainFields", "Color");
$tblDemo2->displayAs("fldLongField", "Long Field");
$allowableValues2 = array("Green", "Blue", "Red", "Periwinkle");
$tblDemo2->defineAllowableValues("fldCertainFields", $allowableValues2);
$tblDemo2->setTextareaHeight('fldLongField', 50);
$tblDemo2->setLimit(20);
$tblDemo2->addAjaxFilterBox('fldField1');
$tblDemo2->formatFieldWithFunction('fldField2', 'makeBlue');
$tblDemo2->formatFieldWithFunction('fldField1', 'makeBold');
echo "<h2>Table tblDemo2</h2>\n";
$tblDemo2->showTable();
function makeBold($val)
예제 #11
0
<?php

require_once '../../preheader.php';
$page_title = "Create an Event";
#the code for the class
include '../../ajaxCRUD.class.php';
#Create an instance of the class
$tblEvent = new ajaxCRUD("Event", "tblEvent", "pkEventID", "../");
$tblEvent->setCSSFile("cuscosky.css");
$viewPastEvents = FALSE;
if ($_REQUEST['eventFilter'] == 'pastEvents') {
    $viewPastEvents = TRUE;
}
?>
<!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<?php 
$tblEvent->insertHeader();
?>

		<!-- these js/css includes are ONLY to make the calendar widget work
			 these includes are not necessary for the class to work!! -->
		<link rel="stylesheet" href="../includes/jquery.ui.all.css">
		<script src="../includes/jquery.ui.core.js"></script>
		<script src="../includes/jquery.ui.datepicker.js"></script>
	</head>

<?php 
예제 #12
0
24 video 5<br/>
25 - 40 audio tracks<br/>
41 -46 merch   <br/><br/> 
</div>  

    
<?php 
require_once 'preheader.php';
// <-- this include file MUST go first before any HTML/output
#the code for the class
include 'ajaxCRUD.class.php';
// <-- this include file MUST go first before any HTML/output
#this one line of code is how you implement the class
########################################################
##
$tblDemo = new ajaxCRUD("Item", "st_pagedata", "pd_id", "/");
##
########################################################
## all that follows is setup configuration for your fields....
## full API reference material for all functions can be found here - http://ajaxcrud.com/api/
## note: many functions below are commented out (with //). note which ones are and which are not
#i can define a relationship to another table
#the 1st field is the fk in the table, the 2nd is the second table, the 3rd is the pk in the second table, the 4th is field i want to retrieve as the dropdown value
#http://ajaxcrud.com/api/index.php?id=defineRelationship
//$tblDemo->defineRelationship("fkID", "tblDemoRelationship", "pkID", "fldName", "fldSort DESC"); //use your own table - this table (tblDemoRelationship) not included in the installation script
#i don't want to visually show the primary key in the table
//$tblDemo->omitPrimaryKey();
#the table fields have prefixes; i want to give the heading titles something more meaningful
$tblDemo->displayAs("pd_id", "Row");
$tblDemo->displayAs("pd_data", "Page Item");
#set the textarea height of the longer field (for editing/adding)
예제 #13
0
파일: index.php 프로젝트: JJWTimmer/BLAM
$autotext->setLimit(10);
$chatlines = new ajaxCRUD("chatlines", "chatlines", "id");
$chatlines->setLimit(10);
$groups = new ajaxCRUD("groups", "groups", "id");
$groups->setLimit(10);
$handles = new ajaxCRUD("handles", "handles", "id");
$handles->setLimit(10);
$messages = new ajaxCRUD("messages", "messages", "id");
$messages->setLimit(10);
$roles = new ajaxCRUD("roles", "roles", "id");
$roles->setLimit(10);
$tickets = new ajaxCRUD("tickets", "tickets", "id");
$tickets->setLimit(10);
$updates = new ajaxCRUD("updates", "updates", "id");
$updates->setLimit(10);
$users = new ajaxCRUD("users", "users", "id");
$users->setLimit(10);
?>

</head>
<body>
<div id="TopContainer" class="rounded"></div>
<div id="MainContainer">
      <span id="select-table">
          <select id="table-selector">
              <option value="#autotext-div">autotext</option>
              <option value="#chatlines-div">chatlines</option>
              <option value="#groups-div">groups</option>
              <option value="#handles-div">handles</option>
              <option value="#messages-div">messages</option>
              <option value="#roles-div">roles</option>
예제 #14
0
<?php

require_once 'include/preheader.php';
// <-- this include file MUST go first before any HTML/output
include 'include/ajaxCRUD.class.php';
// <-- this include file MUST go first before any HTML/output
$tblDemo = new ajaxCRUD("Modelos", "modelo", "id_modelo", "");
//  $tblDemo->omitPrimaryKey();
$tblDemo->displayAs("id_modelo", "Numero de Modelo");
$tblDemo->displayAs("desc_modelo", "Descripcion");
$tblDemo->displayAs("img_modelo", "Imagen del Modelo");
$tblDemo->setFileUpload("img_modelo", "");
$tblDemo->showTable();
<?php

require_once 'preheader.php';
// <-- this include file MUST go first before any HTML/output
#the code for the class
include 'ajaxCRUD.class.php';
// <-- this include file MUST go first before any HTML/output
global $mysqli;
#this one line of code is how you implement the class
########################################################
##
$tblDemo = new ajaxCRUD("Item", "st_questions", "question_id", "../");
##
########################################################
## all that follows is setup configuration for your fields....
## full API reference material for all functions can be found here - http://ajaxcrud.com/api/
## note: many functions below are commented out (with //). note which ones are and which are not
#i can define a relationship to another table
#the 1st field is the fk in the table, the 2nd is the second table, the 3rd is the pk in the second table, the 4th is field i want to retrieve as the dropdown value
#http://ajaxcrud.com/api/index.php?id=defineRelationship
//$tblDemo->defineRelationship("test_questions", "st_questions", "question_test", "question_question"); //use your own table - this table (tblDemoRelationship) not included in the installation script
//$tblDemo->defineRelationship("question_answer", "st_questions", "question_id", "question_answer");
#i don't want to visually show the primary key in the table
//$tblDemo->omitPrimaryKey();
#the table fields have prefixes; i want to give the heading titles something more meaningful
$tblDemo->displayAs("question_question", "Question to Ask");
$tblDemo->displayAs("question_answer", "Display Answer");
$tblDemo->displayAs("question_video", "Occluded Video");
$tblDemo->displayAs("question_test_num", "Question_Order");
$tblDemo->displayAs("fldCheckbox", "Is Selected?");
#set the textarea height of the longer field (for editing/adding)