当前位置: 首页>>代码示例>>PHP>>正文


PHP renderForm函数代码示例

本文整理汇总了PHP中renderForm函数的典型用法代码示例。如果您正苦于以下问题:PHP renderForm函数的具体用法?PHP renderForm怎么用?PHP renderForm使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了renderForm函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: number_format

    $product_p3 = $row ? number_format(floatval($row['product_p3']), 2, ".", "") : "0.00";
    $product_q4 = $row ? floatval($row['product_q4']) : "0";
    $product_p4 = $row ? number_format(floatval($row['product_p4']), 2, ".", "") : "0.00";
    $product_q5 = $row ? floatval($row['product_q5']) : "0";
    $product_p5 = $row ? number_format(floatval($row['product_p5']), 2, ".", "") : "0.00";
    $product_q6 = $row ? floatval($row['product_q6']) : "0";
    $product_p6 = $row ? number_format(floatval($row['product_p6']), 2, ".", "") : "0.00";
    $product_q7 = $row ? floatval($row['product_q7']) : "0";
    $product_p7 = $row ? number_format(floatval($row['product_p7']), 2, ".", "") : "0.00";
    $product_q8 = $row ? floatval($row['product_q8']) : "0";
    $product_p8 = $row ? number_format(floatval($row['product_p8']), 2, ".", "") : "0.00";
    $product_purchased = $row ? intval($row['product_purchased']) : "0";
    $product_soh = $row ? intval($row['product_soh']) : "0";
    $product_reorder = $row ? intval($row['product_reorder']) : "0";
    $product_sold = $row ? intval($row['product_sold']) : "0";
    $product_adjusted = $row ? intval($row['product_adjusted']) : "0";
    $product_weight = $row ? number_format(floatval($row['product_weight']), 2, ".", "") : "0.00";
    $quick_sale = $row ? $row['quick_sale'] : "N";
    $quick_sale_price = $row ? number_format(floatval($row['quick_sale_price']), 2, ".", "") : "0.00";
    $product_image = $row ? $row['product_image'] : "";
    $product_type = $row ? $row['product_type'] : "P";
    $product_cost = $row ? number_format(floatval($row['product_cost']), 2, ".", "") : "0.00";
    $freight_cost = $row ? number_format(floatval($row['freight_cost']), 2, ".", "") : "0.00";
    $member_disc = $row ? $row['member_disc'] : "Y";
    $follow_up = $row ? $row['follow_up'] : "N";
    $has_serial = $row ? $row['has_serial'] : "N";
    $web_sale = $row ? $row['web_sale'] : "Y";
    $web_special = $row ? $row['web_special'] : "N";
    // show form
    renderForm($id, $product_name, $product_code, $product_alias, $product_category, $product_subcategory, $product_desc, $product_supplier, $product_suppliercode, $product_active, $product_stocked, $product_pricebreak, $product_q1, $product_p1, $product_q2, $product_p2, $product_q3, $product_p3, $product_q4, $product_p4, $product_q5, $product_p5, $product_q6, $product_p6, $product_q7, $product_p7, $product_q8, $product_p8, $product_purchased, $product_soh, $product_reorder, $product_sold, $product_adjusted, $product_weight, $quick_sale, $quick_sale_price, $product_image, $product_type, $product_cost, $freight_cost, $web_sale, $web_special, $member_disc, $follow_up, $has_serial, $error);
}
开发者ID:anjijava16,项目名称:mis_Imp,代码行数:31,代码来源:inventory-edit+-+Copy+(3).php

示例2: header

            } else {
                echo "ERROR: could not prepare SQL statement.";
            }
            //redirects the user once the record has been successfully updated into the database
            header("Location: view.php");
        }
    } else {
        echo "Error!";
    }
} else {
    // checks to see if the biz_id is valid
    if (is_numeric($_GET['biz_id']) && $_GET['biz_id'] > 0) {
        // gets biz_id from URL
        $biz_id = $_GET['biz_id'];
        // gets the data from the database
        if ($stmt = $mysqli->prepare("SELECT * FROM businesses WHERE biz_id=?")) {
            $stmt->bind_param("i", $biz_id);
            $stmt->execute();
            $stmt->bind_result($biz_id, $biz_name, $address, $address2, $city, $zipcode, $phone, $website, $hours, $category_id);
            $stmt->fetch();
            renderForm($biz_name, $address, $address2, $city, $zipcode, $phone, $website, $hours, $category_id, NULL, $biz_id);
            $stmt->close();
        } else {
            echo "Error: could not prepare SQL statement";
        }
    } else {
        header("Location: view.php");
    }
}
// close the database connection
$mysqli->close();
开发者ID:andresdoming,项目名称:Android_App_Web_Backend,代码行数:31,代码来源:edit_biz.php

示例3: mysql_query

    // get the 'id' value from the URL (if it exists), making sure that it is valid (checing that it is numeric/larger than 0)
    if (isset($_GET['id']) && is_numeric($_GET['id']) && $_GET['id'] > 0) {
        // query db
        $id = $_GET['id'];
        $result = mysql_query("SELECT id,username,firstname,phonenumber,email,IsMentor from cc_users where id={$id}") or die(mysql_error());
        $row = mysql_fetch_array($result);
        // check that the 'id' matches up with a row in the databse
        if ($row) {
            // get data from db
            $username = $row['username'];
            $firstname = $row['firstname'];
            $phonenumber = $row['phonenumber'];
            $email = $row['email'];
            $IsMentor = $row['IsMentor'];
            // show form
            renderForm($id, $username, $firstname, $phonenumber, $email, $IsMentor, $error);
        } else {
            echo "No results!";
        }
    } else {
        echo 'Error!2';
    }
}
?>
										</div><!-- /.modal-content -->
									</div><!-- /.modal-dialog -->
								</div><!-- PAGE CONTENT ENDS -->
							</div><!-- /.col -->
						</div><!-- /.row -->
					</div><!-- /.page-content -->
				</div>
开发者ID:Poornimaraji94,项目名称:Project1,代码行数:31,代码来源:cc_students_details.php

示例4: renderSortableNode

function renderSortableNode($node)
{
    if (!$node->hasParent()) {
        return '
         <li class="uk-nestable-item"  data-id="' . $node->id . '" ">
            <div class="uk-nestable-panel">
            <i class="uk-nestable-handle uk-icon uk-icon-bars uk-margin-small-right"></i>
               ' . $node->name . '
            </div>
        </li>';
    } else {
        $html = '<li class="uk-nestable-item uk-parent" data-id="' . $node->id . '">
                    <div class="uk-nestable-panel">
                        <i class="uk-nestable-handle uk-icon uk-icon-bars uk-margin-small-right"></i>
                       ' . $node->name . '' . renderForm($node) . '
                    </div>';
        $html .= '<ul class="uk-nestable-list">';
        foreach ($node->children as $child) {
            $html .= renderSortableNode($child);
        }
        $html .= '</ul>';
        $html .= '</li>';
    }
    return $html;
}
开发者ID:devillom,项目名称:simpleshop,代码行数:25,代码来源:CategoryHelper.php

示例5: mysql_query

    } else {
        //delete hfs template file
        mysql_query("DELETE FROM i_hfs WHERE filename='{$filename}'") or die(mysql_error());
        $repo_path = 'repo/';
        unlink($repo_path . $filename);
        header('Location: hfs.php');
    }
} else {
    include '../includes.php';
    include '../settings.php';
    if (isset($_GET['u'])) {
        $filename = clean($_GET['u']);
        if (!isset($_SESSION['userwd'])) {
            header('Location: ../404.php');
        } else {
            $nick = $_SESSION['userwd'];
            $data = mysql_query("SELECT (userwd) FROM i_users WHERE userwd='{$nick}'") or die(mysql_error());
            if (mysql_num_rows($data) > 0 && in_array(strtolower($nick), $admin, true)) {
                if (isset($_SESSION['xuidPJVE218'])) {
                    renderForm('', $filename);
                } else {
                    header('Location: index.php');
                }
            } else {
                header('Location: ../404.php');
            }
        }
    } else {
        header('Location: users.php');
    }
}
开发者ID:heiswayi,项目名称:ishare-plus,代码行数:31,代码来源:delete_hfs.php

示例6: json_encode

                 // Logged higher up or log this here somehow? TODO
             }
             if (isset($is_final) && $is_final) {
                 echo json_encode(array('result' => 'OK', 'id' => $id, 'target' => $target, 'msg' => tt('You succesfully submitted your proposal for %1$s', $project['title']) . (_DEBUG ? showDrupalMessages() : '')));
             } else {
                 $version = $properties['state'] == 'draft' ? t('draft') : t('public');
                 echo json_encode(array('result' => 'OK', 'id' => $id, 'msg' => ($new ? tt('You succesfully saved a %2$s version of your proposal for %1$s', $project['title'], $version) : tt('You succesfully changed the %2$s version of your proposal for %1$s', $project['title'], $version)) . (_DEBUG ? showDrupalMessages() : '')));
             }
         } else {
             echo jsonBadResult();
         }
     }
     break;
 case 'reject_form':
     $target = getRequestVar('target');
     renderForm(drupal_get_form('vals_soc_reject_form', getRequestVar('id', 0), $target), $target);
     break;
 case 'reject':
     $id = getRequestVar('id', 0, 'post');
     $reason = getRequestVar('reason', '', 'post');
     $rationale = getRequestVar('rationale', '', 'post');
     try {
         $good_result = t('You rejected this proposal') . '<script>hideOtherDivsAfterProposalReject(' . $id . ')</script>';
         $result = Proposal::getInstance()->rejectProposal($id, $reason, $rationale);
         if ($result) {
             $props = Proposal::getInstance()->getProposalById($id, true);
             module_load_include('inc', 'vals_soc', 'includes/module/vals_soc.mail');
             notify_student_and_supervisor_of_proposal_rejection_by_mentor($props);
             echo jsonGoodResult(true, $good_result);
         } else {
             echo jsonBadResult(t('You tried to reject this proposal, but it failed'));
开发者ID:edwinraycom,项目名称:vals-soc,代码行数:31,代码来源:proposal_actions.php

示例7: header

                } else {
                    header("Location: ../?admin=roster");
                }
            }
            //add new
        } else {
            if (isset($_POST['submit'])) {
                $unit = htmlentities($_POST['unit'], ENT_QUOTES);
                $image = htmlentities($_POST['image'], ENT_QUOTES);
                $about = htmlentities($_POST['about'], ENT_QUOTES);
                $about_internal = htmlentities($_POST['about_internal'], ENT_QUOTES);
                if ($unit == '' || $image == '') {
                    $error = 'ERROR: Please fill in all required fields!';
                    renderForm($unit, $image, $about, $about_internal, $error, $id);
                } else {
                    if ($stmt = $conn->prepare("INSERT roster (unit, image, about, about_internal) VALUES (?, ?, ?, ?)")) {
                        $stmt->bind_param("ssss", $unit, $image, $about, $about_internal);
                        $stmt->execute();
                        $stmt->close();
                    } else {
                        echo "ERROR: Could not prepare SQL statement.";
                    }
                    header("Location: ../?admin=roster");
                }
            } else {
                renderForm();
            }
        }
        include '../footer.php';
    }
}
开发者ID:WSIContractor,项目名称:Simplex,代码行数:31,代码来源:roster.php

示例8: mysql_query

            echo '<META HTTP-EQUIV="Refresh" Content="0; URL=category-list.php">';
        }
    } else {
        // if the 'id' isn't valid, display an error
        echo 'Error!';
    }
} else {
    // get the 'id' value from the URL (if it exists), making sure that it is valid (checing that it is numeric/larger than 0)
    if (isset($_GET['id']) && is_numeric($_GET['id']) && $_GET['id'] > 0) {
        // query db
        $id = $_GET['id'];
        $result = mysql_query("SELECT * FROM category WHERE id={$id}") or die(mysql_error());
        $row = mysql_fetch_array($result);
        // check that the 'id' matches up with a row in the databse
        if ($row) {
            // get data from db
            $category_name = $row['category_name'];
            $category_type = $row['category_type'];
            // show form
            renderForm($id, $category_name, $category_type, $error, '');
        } else {
            echo "No results!";
        }
    } else {
        echo 'Error!';
    }
}
?>

</div>
开发者ID:anjijava16,项目名称:mis_Imp,代码行数:30,代码来源:category-edit.php

示例9: unset

     if (isset($_POST['path'])) {
         $originalPath = $_POST['path'];
     }
     unset($_POST);
     $form = drupal_get_form("vals_soc_project_form", $obj, $target);
     if ($originalPath) {
         $form['#action'] = url($originalPath);
     }
     // Process the submit button which uses ajax
     //$form['submit'] = ajax_pre_render_element($form['submit']);
     // Build renderable array
     // 		$build = array(
     // 				'form' => $form,
     // 				'#attached' => $form['submit']['#attached'], // This will attach all needed JS behaviors onto the page
     // 		);
     renderForm($form, $target);
     break;
 case 'delete':
     $type = altSubValue($_POST, 'type', '');
     $id = altSubValue($_POST, 'id', '');
     if (!isValidOrganisationType($type)) {
         echo jsonBadResult(t('There is no such type we can delete'));
     } elseif (count(Proposal::getProposalsPerProject($id))) {
         echo jsonBadResult(t('You cannot delte the project; there are already students working on a proposal for this project. You can still edit it though.'));
     } else {
         $result = Groups::removeGroup($type, $id);
         ThreadedComments::getInstance()->removethreadsForEntity($id, $type);
         echo $result ? jsonGoodResult(true, '', array('extra' => $mine ? array('mine' => 1) : '')) : jsonBadResult();
     }
     break;
 default:
开发者ID:edwinraycom,项目名称:vals-soc,代码行数:31,代码来源:project_actions.php

示例10: renderForm

    $result = $conf_fondy['LOCALE_SUM'] . ': ' . $amount . ' ' . $conf_fondy['MERCHANT_CURRENCY'] . ' ';
    $result .= '
<script src="https://api.fondy.eu/static_common/v1/checkout/oplata.js"></script>
<script>
	var button = $ipsp.get(\'button\');
	button.setMerchantId(' . $conf_fondy['MERCHANT_ID'] . ');
	button.setAmount(' . $amount . ', \'' . $conf_fondy['FONDY_CURRENCY'] . '\', true);
	button.setResponseUrl(\'' . $conf_fondy['RESPONSE_URL'] . '\');
        button.addParam(\'server_callback_url\',\'' . $conf_fondy['FRONTEND_URL'] . '\');
	button.setHost(\'api.fondy.eu\');
	button.addField({
		label: \'Payment ID\',
		name: \'paymentid\',
                value: \'' . $customer_id . '\',
                readonly :true,
		required: true
	});
</script>
<button onclick="location.href=button.getUrl()">' . $conf_fondy['LOCALE_SUBMIT'] . '</button>
';
    return $result;
}
if (isset($_POST['amount'])) {
    // собираем форму для отправки ПС
    $payment_form = renderForm($_POST['amount']);
} else {
    //формочка выбора суммы платежа
    $payment_form = renderAmountForm();
}
//показываем все что нужно в темплейт
include $template_file;
开发者ID:carriercomm,项目名称:Ubilling,代码行数:31,代码来源:index.php

示例11: mysql_query

} else {
    // get the 'id' value from the URL (if it exists), making sure that it is valid (checing that it is numeric/larger than 0)
    if (isset($_GET['id']) && is_numeric($_GET['id']) && $_GET['id'] > 0) {
        // query db
        $id = $_GET['id'];
        $result = mysql_query("SELECT * FROM w_scav WHERE id={$id}") or die(mysql_error());
        $row = mysql_fetch_array($result);
        // check that the 'id' matches up with a row in the databse
        if ($row) {
            // get data from db
            $charname = $row['charname'];
            $klasse = $row['klasse'];
            $punkte = $row['punkte'];
            $beschreibung = $row['beschreibung'];
            // show form
            renderForm($id, $charname, $klasse, $punkte, $beschreibung, '');
        } else {
            echo "No results!";
        }
    } else {
        echo 'Error!';
    }
}
?>
				</div>
			</div>
			<div class="right_body">
				<div class="box_title"><font color="#018DB8">Men&Uuml;</font></div>
				<div class="box_content">
				<?php 
require_once 'userlink.php';
开发者ID:sliker2013,项目名称:Scav-PHP,代码行数:31,代码来源:update.php

示例12: showOrganisationPage

function showOrganisationPage($show_action, $show_last = FALSE)
{
    //Get my organisations
    $my_id = Users::getMyId();
    $organisations = Groups::getGroups(_ORGANISATION_GROUP, $my_id);
    if (!$organisations->rowCount()) {
        if (Users::isOrganisationAdmin() || user_access('vals admin register')) {
            echo t('You have no organisation yet registered');
            echo '<h2>' . t('Add your organisation') . '</h2>';
            $tab_prefix = 'organisation_page-';
            $target = "{$tab_prefix}1";
            $form = drupal_get_form('vals_soc_organisation_form', '', $target);
            $add_tab = renderForm($form, $target, true);
            $data = array();
            $data[] = array(1, 'Add', 'add', _ORGANISATION_GROUP, null, "target=admin_container&show_action={$show_action}", true, 'adding_to_the right');
            echo renderTabs(1, null, $tab_prefix, _ORGANISATION_GROUP, $data, null, TRUE, $add_tab);
            ?>
			<script type="text/javascript">
			   transform_into_rte();
			   activatetabs('tab_', ['<?php 
            echo $target;
            ?>
']);
	        </script><?php 
        } else {
            echo t('You have not registered yourself to an organisation yet. ');
            echo tt('Register yourself with your organisation at %1$s using the code you got from a colleague.', '<a href="' . _WEB_URL . "/user/{$my_id}/edit\">" . t('your account') . '</a>');
        }
    } else {
        if ($show_action == 'administer') {
            showOrganisationAdminPage($organisations, $show_action, $show_last);
        } elseif ($show_action == 'view') {
            showOrganisationAdminPage($organisations, $show_action, $show_last);
        } elseif ($show_action == 'members') {
            showOrganisationMembersPage($organisations);
        } elseif ($show_action == 'overview') {
            showOrganisationOverviewPage($organisations);
            //showInstituteGroupsAdminPage($my_institute, $show_last);
        } else {
            echo tt('There is no such action possible %1$s', $show_action);
        }
    }
}
开发者ID:edwinraycom,项目名称:vals-soc,代码行数:43,代码来源:administration.php

示例13: mysql_query

    if (isset($_GET['definition_id']) && is_numeric($_GET['definition_id']) && $_GET['definition_id'] >= 0) {
        // query db
        $definition_id = $_GET['definition_id'];
        $sql = "select w.word_id, w.english, w.kurdish_en, w.kurdish_ku, d.definition " . "from word_tbl w, definition_tbl d" . " where w.word_id = d.word_id and  d.definition_id = {$definition_id}";
        $result = mysql_query($sql) or die(mysql_error());
        $row = mysql_fetch_array($result);
        // check that the 'id' matches up with a row in the databse
        if ($row) {
            /*
             definition_id bigint unsigned not null auto_increment primary key,
                      word_id bigint unsigned, foreign key (word_id) references word_tbl(word_id) on delete cascade,
                      definition varchar(1000),
                      user_id int unsigned , foreign key (user_id) references user_tbl(user_id) on delete restrict
            * 
            */
            // get data from db
            $word_id = $row['word_id'];
            $english = $row['english'];
            $kurdish_en = $row['kurdish_en'];
            $kurdish_ku = $row['kurdish_ku'];
            $definition = $row['definition'];
            // show form
            //$defination_id, $word_id, $definition, $user_id, $error
            renderForm($definition_id, $word_id, $english, $kurdish_en, $kurdish_ku, $definition, '');
        } else {
            echo "No results!";
        }
    } else {
        echo 'Error!';
    }
}
开发者ID:greglike1001,项目名称:dictionary-backup,代码行数:31,代码来源:edit_approved_definition.php

示例14: mysql_query

        } else {
            // save the data to the database
            mysql_query("UPDATE modules SET name='{$username}', module_name='{$module_name}' WHERE module_id='{$id}'") or die(mysql_error());
            // once saved, redirect back to the view page
            header("Location: view.php");
        }
    } else {
        // if the 'id' isn't valid, display an error
        echo 'Error!';
    }
} else {
    // get the 'id' value from the URL (if it exists), making sure that it is valid (checing that it is numeric/larger than 0)
    if (isset($_GET['id']) && is_numeric($_GET['id']) && $_GET['id'] > 0) {
        // query db
        $id = $_GET['id'];
        $result = mysql_query("SELECT * FROM modules WHERE module_id={$id}") or die(mysql_error());
        $row = mysql_fetch_array($result);
        // check that the 'id' matches up with a row in the databse
        if ($row) {
            // get data from db
            $username = $row['name'];
            $module_name = $row['module_name'];
            // show form
            renderForm($id, $username, $module_name, '');
        } else {
            echo "No results!";
        }
    } else {
        echo 'Error!';
    }
}
开发者ID:Year-2-Team-Project,项目名称:StudentWare,代码行数:31,代码来源:edit.php

示例15: mysql_real_escape_string

    $expense_company = mysql_real_escape_string(htmlspecialchars($_POST['expense_company']));
    $expense_category = mysql_real_escape_string(htmlspecialchars($_POST['expense_category']));
    $expense_amount = mysql_real_escape_string(htmlspecialchars($_POST['expense_amount']));
    $expense_notes = mysql_real_escape_string(htmlspecialchars($_POST['expense_notes']));
    $expense_reff = mysql_real_escape_string(htmlspecialchars($_POST['expense_reff']));
    $expense_gst = floatval($_POST['gst']);
    // check to make sure both fields are entered
    if ($expense_date == '' || $expense_company == '' || $expense_category == '' || $expense_amount == '' || $expense_notes == '') {
        // generate error message
        $error = 'ERROR: Please fill in all required fields!';
        // if either field is blank, display the form again
        renderForm(date('d/m/Y', $expense_date), $expense_company, $expense_category, $expense_amount, $expense_notes, $expense_reff, $expense_gst, $error);
    } else {
        // save the data to the database
        mysql_query("update expenses SET expense_date='{$expense_date}', expense_company='{$expense_company}', expense_category='{$expense_category}', expense_amount='{$expense_amount}', expense_notes='{$expense_notes}', expense_reff='{$expense_reff}', expense_gst='{$expense_gst}' WHERE id = " . intval($_GET['id']) . ";") or die(mysql_error());
        // once saved, redirect back to the view page
        echo 'Expense Record';
        echo '<META HTTP-EQUIV="Refresh" Content="1; URL=expense-list.php">';
    }
} else {
    $result = mysql_query("SELECT * FROM expenses WHERE id = " . intval($_GET['id']) . ";") or die(mysql_error());
    if (mysql_num_rows($result) == 0) {
        die('The record was not foung');
    }
    $row = mysql_fetch_assoc($result);
    renderForm(date('Y/m/d', $row['expense_date']), $row['expense_company'], $row['expense_category'], $row['expense_amount'], $row['expense_notes'], $row['expense_reff'], $row['expense_gst'], '');
}
?>

</div>
开发者ID:anjijava16,项目名称:mis_Imp,代码行数:30,代码来源:expense-edit.php


注:本文中的renderForm函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。