本文整理汇总了PHP中makeTextField函数的典型用法代码示例。如果您正苦于以下问题:PHP makeTextField函数的具体用法?PHP makeTextField怎么用?PHP makeTextField使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了makeTextField函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: present
function present($player)
{
$message = '';
if (count($this->errors) > 0) {
foreach ($this->errors as $booboo) {
$message .= $booboo . BR;
}
}
$this->data['message'] = $message;
if ($player->id != null) {
$this->data['pid'] = makeTextField('hidden', '', 'id', $player->id, "", 10, 10, false);
} else {
$this->data['pid'] = makeTextField('hidden', '', 'id', $player->id, "", 10, 10, true);
}
$this->data['pFirstName'] = makeTextField('text', 'First Name', 'playerFirstName', $player->playerFirstName);
$this->data['pLastName'] = makeTextField('text', 'Last Name', 'playerLastName', $player->playerLastName);
$this->data['pNumber'] = makeTextField('text', 'Jersey Number', 'playerNumber', $player->playerNumber);
$this->data['pPosition'] = makeTextField('text', 'Position', 'playerPosition', $player->playerPosition);
//$this->data['pPhoto'] = makeTextField('text', 'Player Mugshot File Name','playerPhoto', $player->playerPhoto);
$this->data['pagebody'] = 'Roster/player_edit';
if ($player->id != null) {
$this->data['psubmit'] = makeSubmitButton('Save', "Click here to edit player.", 'submitButton', 'editAdd', 'btn-success', '_fields/submit');
$this->data['pdelete'] = makeSubmitButton('Delete Player', "Click here to delete player.", 'submitButton', 'delete', 'btn-success', '_fields/submit');
$this->data['pcancel'] = makeSubmitButton('Cancel', "Click here to cancel.", 'submitButton', 'cancel', 'btn-success', '_fields/submit');
} else {
$this->data['psubmit'] = makeSubmitButton('Add Player', "Click here to add player.", 'submitButton', 'editAdd', 'btn-success', '_fields/submit');
$this->data['pcancel'] = makeSubmitButton('Cancel', "Click here to cancel.", 'submitButton', 'cancel', 'btn-success', '_fields/submit');
$this->data['pdelete'] = makeSubmitButton('Delete Player', "Click here to delete player.", 'submitButton', 'delete', 'btn-success', '_fields/hiddenBtn');
}
$this->render();
}
示例2: makeCommentBox
function makeCommentBox($comments, $commentToEdit = null, $userid = null, $admin = false)
{
$CI =& get_instance();
if (!function_exists('makePHPButton')) {
$CI->load->helper('button_helper.php');
}
$commentBox = '';
foreach ($comments as $comment) {
if (($userDat = $CI->users->get($comment->poster_id)) != null) {
$comment->user = '<a class="userLink" href="/Account/profile/' . $userDat->username . '">' . $userDat->username . '</a>';
} else {
$comment->user = "<s>Deleted User</s>";
}
$comment->adminContent = "";
if ($admin) {
if ($commentToEdit == null || $commentToEdit != $comment->comment_id) {
$comment->adminContent .= makePHPButton("/Admin/editComment/" . $comment->post_id . '/' . $comment->comment_id, "Edit", "cId", $comment->comment_id, "button floatLeft");
} else {
$comment->adminContent .= '<form action="/Admin/saveComment/' . $comment->post_id . '" method="post">';
$comment->adminContent .= makeTextField('Title', 'title', $comment->title);
$comment->adminContent .= makeTextArea('Comment', 'content', $comment->content, "", 1000, 25, 5, false);
$comment->adminContent .= makeSubmitButton("Save", "Save", "button");
$comment->adminContent .= '</form>';
$comment->title = "";
$comment->content = "";
}
$comment->adminContent .= makePHPButton("/Admin/deleteComment/" . $comment->post_id . '/' . $comment->comment_id, "Delete", "cId", $comment->comment_id, "button floatLeft");
}
$commentBox .= $CI->parser->parse('_j1_comment_box', $comment, true);
}
return $commentBox;
}
示例3: makeContentForm
function makeContentForm($handler, $titleVal = "", $contentVal = "", $classExtra = "", $contentLbl = "Content", $submitLbl = "Submit", $titleLbl = "Title", $explain = "")
{
$CI =& get_instance();
$CI->load->helper("formfields");
$array = array("handler" => $handler, "title" => makeTextField($titleLbl, 'title', $titleVal), "content" => makeTextArea($contentLbl, 'content', $contentVal, "", 1000, 25, 5, false), "fsubmit" => makeSubmitButton($submitLbl, $explain, $classExtra));
return $CI->parser->parse('_pogfield/_content_form', $array, true);
}
示例4: present
function present($player)
{
// format any errors
$message = '';
if (count($this->errors) > 0) {
foreach ($this->errors as $invalid) {
$message .= $invalid . ' . . . ';
}
}
$this->data['message'] = $message;
$this->data['fplayerid'] = makeTextField('Player ID', 'playerid', $player->PLAYERID, '', 10, 10);
$this->data['ffirstname'] = makeTextField('First Name', 'firstname', $player->FIRSTNAME);
$this->data['flastname'] = makeTextField('Last Name', 'lastname', $player->LASTNAME);
$this->data['fteamcode'] = makeTextField('Team Code', 'teamcode', $player->TEAMCODE);
$this->data['fplayernum'] = makeTextField('Jersey Number', 'playernum', $player->PLAYERNUM);
$this->data['fposition'] = makeTextField('Position', 'position', $player->POSITION);
$this->data['fimage'] = makeTextField('Photo File Name', 'image', $player->IMAGE);
$this->data['finfo'] = makeTextArea('Player History', 'info', $player->INFO);
$this->data['fsubmit'] = makeSubmitButton('Save', "Click here to validate the player data", 'btn-success');
$this->data['fdelete'] = makeSubmitButton('Delete', "Click here to delete the player", 'btn-success');
$this->data['fcancel'] = makeSubmitButton('Cancel', "Click here to cancel the change", "submitbutton", "cancel", 'btn-success');
$this->data['pagebody'] = 'player_edit';
$this->data['title'] = 'Player Profile Maintenance';
$this->render();
}
示例5: index
public function index()
{
$this->data['pagebody'] = 'createteam';
$team = $this->teams->create();
$this->data['team_name'] = makeTextField('Team Name', 'team_name', $team->name);
$this->data['max_team_count'] = makeTextField('Max Number of Members', 'max_team_count', $team->max_team_count);
$this->data['fsubmit'] = makeSubmitButton('Create Team', "Click here to validate the post data", 'btn-success');
$this->render();
}
示例6: setup_post_input_fields
public function setup_post_input_fields()
{
/* Restore previous session */
$post = $this->restore_post_session($this->posts->create());
$team = $this->restore_team_session($this->teams->create());
$this->data['title'] = makeTextField('Title *', 'title', $post->title);
$this->data['content'] = $this->data['content'] = makeTextArea('Content*', 'content', $post->content, "", 1000, 25, 5, false);
$this->data['team_name'] = makeTextField('Team Name *', 'team_name', $team->team_name);
$this->data['max_team_count'] = makeTextField('Max Team Members *', 'max_team_count', $team->max_team_count);
}
示例7: present
function present($quote)
{
$message = '';
if (count($this->errors) > 0) {
foreach ($this->errors as $booboo) {
$message .= $booboo . BR;
}
}
$this->data['message'] = $message;
$this->data['fid'] = makeTextField('ID#', 'id', $quote->id, "Unique quote identifier, system-assigned", 10, 10, true);
$this->data['fwho'] = makeTextField('Author', 'who', $quote->who);
$this->data['fmug'] = makeTextField('Picture', 'mug', $quote->mug);
$this->data['fwhat'] = makeTextArea('The Quote', 'what', $quote->what);
$this->data['pagebody'] = 'quote_edit';
$this->data['fsubmit'] = makeSubmitButton('Process Quote', "Click here to validate the quotation data", 'btn-success');
$this->render();
}
示例8: index
public function index()
{
$this->data['pagebody'] = 'signin';
$this->load->helper('ffields');
$user = $this->users->create();
$this->data['username'] = makeTextField('Username', 'username', $user->username);
$this->data['password'] = makePasswordField('Password', 'password', $user->password);
$this->data['submit'] = makeSubmitButton('Sign In', "Click here to validate the user data", 'button floatLeft');
$this->data['signup'] = makeButton("/SignUp", "Sign Up", "button floatLeft");
if (isset($_SESSION['login_error']) == 'wrongcredentials') {
$this->data['message'] = 'Wrong Login Information';
} else {
$this->data['message'] = '';
}
//unset sign up error
unset($_SESSION['signup_error']);
$this->render();
}
示例9: index
public function index()
{
$this->data['pagebody'] = 'signup';
if (isset($_SESSION['signup_error'])) {
$this->data['message'] = $_SESSION['signup_error'];
} else {
$this->data['message'] = '';
}
$user = $this->restore_signup_session();
$this->data['username'] = makeTextField('Username', 'username', $user->username);
$this->data['password'] = makePasswordField('Password', 'password', '');
$this->data['password2'] = makePasswordField('Password', 'password2', '');
$this->data['email'] = makeTextField('Email', 'email', $user->email);
$this->data['submit'] = makeSubmitButton('Sign Up', "Click here to validate the user data", 'btn-success');
//unset sign in error
unset($_SESSION['login_error']);
$this->render();
}
示例10: session_start
<?php
# This form allows to enter a date. After submitting, all Bank and Cash Account-balances get
# printed seperated by Projects.
session_start();
require "accrp.php";
require "security/secure.php";
beginDocument("list Cash and Bank", $sess_user);
if ($date) {
$ac1 = get_ac_array(1);
foreach ($ac1 as $key => $prj_desc) {
$accounts = new BankAndCashAccounts_byProject($key, $date, "c");
beginPrettyTable(4, "{$prj_desc}");
printRow(array("Account", "Balance"));
while ($row = $accounts->getNext()) {
printRow(array($row["AC5_DESC"], $accounts->getActualBalance() . " "), "irgendwas");
}
printRow(array("Sum", $accounts->getSum()));
endPrettyTable();
}
} else {
openForm("enter Date", $PHP_SELF);
beginPrettyTable("2", "list bank and cash");
makeTextField("date", get_today_hrd_string(), "Date:");
makeSubmitter();
endPrettyTable();
closeForm();
}
endDocument();
示例11: makeHiddenField
makeHiddenField("vr_tp", $vr_tp);
makePlainDropBox("ac_name", $ac_array, "Ac_Name");
makePlainStaticField("t_dt", $today, " ", 10);
startRow();
makePlainStaticField("dr_cr", $dr_cr, "DR./CR", 2);
makePlainTextField("amount", "", "Amount:", 8);
endRow();
startRow();
makePlainStaticField("vr_no", "", "Vr.No.:", 10);
makePlainTextField("vr_dt", $today, "Vr.-Date:", 10);
endRow();
makePlainTextField("party", "", $dr_cr == "C" ? "Paid To" : "Rcvd. from");
if ($vr_tp != "JV") {
makePlainTextField("chq_no", "", "Chq-No.:", 10);
}
makeTextField("remarks", "", "Narration:");
endPrettyTable();
# Start now with that second part of the story
if ($vr_tp == "DB") {
$ac_array = get_ac5_sc_array("5(1/2)", "");
} elseif ($vr_tp == "CR") {
$ac_array = get_ac5_sc_array("5(1/2)", "");
} elseif ($vr_tp == "JV") {
$ac_array = get_ac5_sc_array("5(1/2)", "");
} else {
die("Unknown Voucher-type: ({$vr_tp})");
}
beginPrettyTable("1", "I call it \"Counterbooking\"");
?>
<tr><td>AccountName</td><td>Narration</td><td>Dept</td><td>Amount</td></tr><?php
for ($i = 0; $i < $ac_count; $i++) {
示例12: get_new_vrno
}
$amount = $_POST[$field_name];
$vr_no = get_new_vrno();
# insert voucher
$query = $query_part1 . "('{$vr_no}','{$today}','CR','{$ac1}', '{$ac2}','{$ac3}','{$ac4}','{$ac5}','D','','{$amount}','','opening Balance','{$today}','')";
$result = mysql_query($query, $db);
checkMySQLError();
# insert counterbooking
$query = $query_part1 . "('{$vr_no}','{$today}','CR','0', '5','0','0','0','C','','{$amount}','','opening Balance','{$today}','')";
$result = mysql_query($query, $db);
checkMySQLError();
}
report(1, "Everything seems to be fine. Check via Bank and Cash Report!");
} else {
$db = getDBConnection();
$result = mysql_query("Select * FROM TRANS");
if (mysql_num_rows($result) != 0) {
report(0, "Sorry, opening balance can only be performed when you have no Vouchers entered");
}
$accounts_array = get_ac5_sc_array("5(1)", "B");
beginPrettyTable("2", "enter opening balances");
openForm("openingbalance", $PHP_SELF);
makeHiddenField("submitnow", 0);
foreach ($accounts_array as $ac5 => $desc) {
makeTextField("account_field_" . $ac5, "", $desc);
}
makeSpecialSubmitter("submit", "onClick='this.form.submitnow.value=\"1\"'");
closeForm();
endPrettyTable();
}
endDocument();
示例13: search
public function search()
{
$this->data['pagebody'] = 'search';
$this->data['username'] = makeTextField('Username', 'username', '');
$searchusername = $this->input->post('username');
$users = $this->users->some_like('username', $searchusername);
$this->data['userlistview'] = $users;
$this->data['searchlist'] = $this->parser->parse('_searchlist', $this->data, true);
$this->data['resultslabel'] = 'Search Results:';
$this->render();
//redirect('/Admin/search');
}
示例14: endPrettyTable
?>
<tr>
<?php
echo "<td><a href='list_ac5.php'>show List</a></td>";
?>
</tr>
<tr>
<td><hr color='black'></td>
</tr>
<?php
endPrettyTable();
?>
</td>
<td valign=top align=center width='65%'>
<?php
openForm("enterAC_CODE5", $PHP_SELF);
beginPrettyTable("2", $lEnterCustomer);
makeDropBox("ac_id1", $ac1_array, "AC_CODE1");
makeDropBox("ac_id2", $ac2_array, "AC_CODE2");
makeDropBox("ac_id3", $ac3_array, "AC_CODE3");
makeDropBox("ac_id4", $ac4_array, "AC_CODE4");
makeTextField("ac5_desc", "", "AC_CODE5");
makeSubmitter();
endPrettyTable();
closeForm();
?>
</td>
</table>
<?php
}
endDocument();
示例15: displayPlayer
function displayPlayer($ID = null, $invalidEntry = false)
{
$this->session->set_userdata('editPage', '/player/displayPlayer/' . $ID);
// If null, we are creating a new player
if ($ID === null) {
$playerTemp = $this->createPlayer();
// If displayPlayer is being recalled from validation, it is therefore invalid.
} else {
if ($invalidEntry) {
$playerTemp = $this->parsePlayerBuffer();
// Retrieve player from database with ID
} else {
$playerTemp = $this->loadPlayerFromDb($ID);
}
}
// determine if we're in edit mode
if (isset($_SESSION['editMode'])) {
$editMode = $this->session->userdata('editMode');
} else {
$editMode = FALSE;
}
$message = '';
if (count($this->errors) > 0) {
foreach ($this->errors as $booboo) {
$message .= $booboo . "<BR>";
}
}
$this->data['message'] = $message;
// make text fields for each key value pair
foreach ($playerTemp as $key => $val) {
$this->data[$key] = makeTextField($key, $key, $val, "", 40, 15, !$editMode);
}
// override previous foreach loop: ID and Photo are not text fields
$this->data['ID'] = $playerTemp->ID;
$this->data['Photo'] = $playerTemp->Photo;
// Get all Codes from standings table and populate dropdown list
$this->db->select('Code');
$query = $this->db->get('standings');
foreach ($query->result() as $row) {
$codes[] = $row->Code;
}
$this->session->set_userdata('codes', $codes);
$this->data['Code'] = makeComboField('Code', "Code", 24, $codes, "", 40, 15, !$editMode);
$this->data['Submit'] = "";
$this->data['Cancel'] = "";
$this->data['Delete'] = "";
// if editMode is set and we're in edit mode, display CRUD controls
if (isset($_SESSION['editMode']) && $this->session->userdata('editMode')) {
$this->data['Submit'] = makeSubmitButton('Save', "Save", 'btn-success');
$this->data['Cancel'] = makeCancelButton('Cancel', "Cancel", 'btn-primary');
$this->data['Delete'] = makeDeleteButton('Delete', "Delete", 'btn-danger', $ID);
}
$this->data['pagebody'] = 'player';
$this->render();
}