本文整理汇总了PHP中thisOr函数的典型用法代码示例。如果您正苦于以下问题:PHP thisOr函数的具体用法?PHP thisOr怎么用?PHP thisOr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了thisOr函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: thisOr
?>
</td>
<td class="tdCell" align="left"><?php
echo thisOr($row[3]);
?>
</td>
<td class="tdCell" align="left"><?php
echo thisOr($row[4]);
?>
</td>
<td class="tdCell" align="left"><?php
echo thisOr($row[5]);
?>
</td>
<td class="tdCell" align="left"><?php
echo thisOr($row[6]);
?>
</td>
<td class="tdCell" align="left">
<?php
echo $row[7] && $row[8] ? "Banned" : ($row[8] ? "Active" : "Waiting approval");
?>
</td>
<td class="tdCaptionCell" align="left">
<?php
if (!$row[8]) {
// if member is not approved, display approve link
?>
<a href="pageChangeMemberStatus.php?memberID=<?php
echo $row[0];
?>
示例2: thisOr
"></i></a>
<?php
} else {
echo " ";
}
?>
</td>
<td class="tdCell" align="left"><a href="pageEditGroup.php?groupID=<?php
echo $row[0];
?>
"><?php
echo $row[1];
?>
</a></td>
<td class="tdCell" align="left"><?php
echo thisOr($row[2]);
?>
</td>
<td align="right" class="tdCell">
<?php
echo $groupMembersCount;
?>
</td>
<td class="tdCaptionCell" align="left">
<a href="pageEditMember.php?groupID=<?php
echo $row[0];
?>
"><i class="glyphicon glyphicon-plus-sign" title="<?php
echo $Translation["add new member"];
?>
"></i></a>
示例3: thisOr
<td><?php
echo $fn;
?>
</td>
<td class="<?php
echo $diff ? 'bold text-success' : '';
?>
"><?php
echo $fd['appgini'];
?>
</td>
<td class="<?php
echo $diff ? 'bold text-danger' : '';
?>
"><?php
echo thisOr($fd['db'], "Doesn't exist!");
?>
</td>
<td>
<?php
if ($diff && $no_db) {
?>
<a href="pageRebuildFields.php?t=<?php
echo $tn;
?>
&f=<?php
echo $fn;
?>
" class="btn btn-success btn-xs btn_create" data-toggle="tooltip" data-placement="top" title="Create the field by running an ADD COLUMN query."><i class="glyphicon glyphicon-plus"></i> Create it</a>
<?php
} elseif ($diff) {
示例4: orders_form
function orders_form($selected_id = '', $AllowUpdate = 1, $AllowInsert = 1, $AllowDelete = 1, $ShowCancel = 0)
{
// function to return an editable form for a table records
// and fill it with data of record whose ID is $selected_id. If $selected_id
// is empty, an empty form is shown, with only an 'Add New'
// button displayed.
global $Translation;
// mm: get table permissions
$arrPerm = getTablePermissions('orders');
if (!$arrPerm[1] && $selected_id == '') {
return '';
}
$AllowInsert = $arrPerm[1] ? true : false;
// print preview?
$dvprint = false;
if ($selected_id && $_REQUEST['dvprint_x'] != '') {
$dvprint = true;
}
$filterer_CustomerID = thisOr(undo_magic_quotes($_REQUEST['filterer_CustomerID']), '');
$filterer_EmployeeID = thisOr(undo_magic_quotes($_REQUEST['filterer_EmployeeID']), '');
$filterer_ShipVia = thisOr(undo_magic_quotes($_REQUEST['filterer_ShipVia']), '');
// populate filterers, starting from children to grand-parents
// unique random identifier
$rnd1 = $dvprint ? rand(1000000, 9999999) : '';
// combobox: CustomerID
$combo_CustomerID = new DataCombo();
// combobox: EmployeeID
$combo_EmployeeID = new DataCombo();
// combobox: OrderDate
$combo_OrderDate = new DateCombo();
$combo_OrderDate->DateFormat = "mdy";
$combo_OrderDate->MinYear = 1900;
$combo_OrderDate->MaxYear = 2100;
$combo_OrderDate->DefaultDate = parseMySQLDate('1', '1');
$combo_OrderDate->MonthNames = $Translation['month names'];
$combo_OrderDate->NamePrefix = 'OrderDate';
// combobox: RequiredDate
$combo_RequiredDate = new DateCombo();
$combo_RequiredDate->DateFormat = "mdy";
$combo_RequiredDate->MinYear = 1900;
$combo_RequiredDate->MaxYear = 2100;
$combo_RequiredDate->DefaultDate = parseMySQLDate('1', '1');
$combo_RequiredDate->MonthNames = $Translation['month names'];
$combo_RequiredDate->NamePrefix = 'RequiredDate';
// combobox: ShippedDate
$combo_ShippedDate = new DateCombo();
$combo_ShippedDate->DateFormat = "mdy";
$combo_ShippedDate->MinYear = 1900;
$combo_ShippedDate->MaxYear = 2100;
$combo_ShippedDate->DefaultDate = parseMySQLDate('', '');
$combo_ShippedDate->MonthNames = $Translation['month names'];
$combo_ShippedDate->NamePrefix = 'ShippedDate';
// combobox: ShipVia
$combo_ShipVia = new DataCombo();
if ($selected_id) {
// mm: check member permissions
if (!$arrPerm[2]) {
return "";
}
// mm: who is the owner?
$ownerGroupID = sqlValue("select groupID from membership_userrecords where tableName='orders' and pkValue='" . makeSafe($selected_id) . "'");
$ownerMemberID = sqlValue("select lcase(memberID) from membership_userrecords where tableName='orders' and pkValue='" . makeSafe($selected_id) . "'");
if ($arrPerm[2] == 1 && getLoggedMemberID() != $ownerMemberID) {
return "";
}
if ($arrPerm[2] == 2 && getLoggedGroupID() != $ownerGroupID) {
return "";
}
// can edit?
if ($arrPerm[3] == 1 && $ownerMemberID == getLoggedMemberID() || $arrPerm[3] == 2 && $ownerGroupID == getLoggedGroupID() || $arrPerm[3] == 3) {
$AllowUpdate = 1;
} else {
$AllowUpdate = 0;
}
$res = sql("select * from `orders` where `OrderID`='" . makeSafe($selected_id) . "'", $eo);
if (!($row = db_fetch_array($res))) {
return error_message($Translation['No records found']);
}
$urow = $row;
/* unsanitized data */
$hc = new CI_Input();
$row = $hc->xss_clean($row);
/* sanitize data */
$combo_CustomerID->SelectedData = $row['CustomerID'];
$combo_EmployeeID->SelectedData = $row['EmployeeID'];
$combo_OrderDate->DefaultDate = $row['OrderDate'];
$combo_RequiredDate->DefaultDate = $row['RequiredDate'];
$combo_ShippedDate->DefaultDate = $row['ShippedDate'];
$combo_ShipVia->SelectedData = $row['ShipVia'];
} else {
$combo_CustomerID->SelectedData = $filterer_CustomerID;
$combo_EmployeeID->SelectedData = $filterer_EmployeeID;
$combo_ShipVia->SelectedData = $filterer_ShipVia;
}
$combo_CustomerID->HTML = '<span id="CustomerID-container' . $rnd1 . '"></span><input type="hidden" name="CustomerID" id="CustomerID' . $rnd1 . '" value="' . htmlspecialchars($combo_CustomerID->SelectedData, ENT_QUOTES, 'iso-8859-1') . '">';
$combo_CustomerID->MatchText = '<span id="CustomerID-container-readonly' . $rnd1 . '"></span><input type="hidden" name="CustomerID" id="CustomerID' . $rnd1 . '" value="' . htmlspecialchars($combo_CustomerID->SelectedData, ENT_QUOTES, 'iso-8859-1') . '">';
$combo_EmployeeID->HTML = '<span id="EmployeeID-container' . $rnd1 . '"></span><input type="hidden" name="EmployeeID" id="EmployeeID' . $rnd1 . '" value="' . htmlspecialchars($combo_EmployeeID->SelectedData, ENT_QUOTES, 'iso-8859-1') . '">';
$combo_EmployeeID->MatchText = '<span id="EmployeeID-container-readonly' . $rnd1 . '"></span><input type="hidden" name="EmployeeID" id="EmployeeID' . $rnd1 . '" value="' . htmlspecialchars($combo_EmployeeID->SelectedData, ENT_QUOTES, 'iso-8859-1') . '">';
$combo_ShipVia->HTML = '<span id="ShipVia-container' . $rnd1 . '"></span><input type="hidden" name="ShipVia" id="ShipVia' . $rnd1 . '" value="' . htmlspecialchars($combo_ShipVia->SelectedData, ENT_QUOTES, 'iso-8859-1') . '">';
$combo_ShipVia->MatchText = '<span id="ShipVia-container-readonly' . $rnd1 . '"></span><input type="hidden" name="ShipVia" id="ShipVia' . $rnd1 . '" value="' . htmlspecialchars($combo_ShipVia->SelectedData, ENT_QUOTES, 'iso-8859-1') . '">';
//.........这里部分代码省略.........
示例5: thisOr
<td><?php
echo $fn;
?>
</td>
<td class="<?php
echo $diff ? 'bold text-success' : '';
?>
"><?php
echo $fd['appgini'];
?>
</td>
<td class="<?php
echo $diff ? 'bold text-danger' : '';
?>
"><?php
echo thisOr($fd['db'], $Translation['does not exist']);
?>
</td>
<td>
<?php
if ($diff && $no_db) {
?>
<a href="pageRebuildFields.php?t=<?php
echo $tn;
?>
&f=<?php
echo $fn;
?>
" class="btn btn-success btn-xs btn_create" data-toggle="tooltip" data-placement="top" title="<?php
echo $Translation['create field'];
?>
示例6: employees_form
function employees_form($selected_id = '', $AllowUpdate = 1, $AllowInsert = 1, $AllowDelete = 1, $ShowCancel = 0)
{
// function to return an editable form for a table records
// and fill it with data of record whose ID is $selected_id. If $selected_id
// is empty, an empty form is shown, with only an 'Add New'
// button displayed.
global $Translation;
// mm: get table permissions
$arrPerm = getTablePermissions('employees');
if (!$arrPerm[1] && $selected_id == '') {
return '';
}
$AllowInsert = $arrPerm[1] ? true : false;
// print preview?
$dvprint = false;
if ($selected_id && $_REQUEST['dvprint_x'] != '') {
$dvprint = true;
}
$filterer_ReportsTo = thisOr(undo_magic_quotes($_REQUEST['filterer_ReportsTo']), '');
// populate filterers, starting from children to grand-parents
// unique random identifier
$rnd1 = $dvprint ? rand(1000000, 9999999) : '';
// combobox: BirthDate
$combo_BirthDate = new DateCombo();
$combo_BirthDate->DateFormat = "mdy";
$combo_BirthDate->MinYear = 1900;
$combo_BirthDate->MaxYear = 2100;
$combo_BirthDate->DefaultDate = parseMySQLDate('', '');
$combo_BirthDate->MonthNames = $Translation['month names'];
$combo_BirthDate->NamePrefix = 'BirthDate';
// combobox: HireDate
$combo_HireDate = new DateCombo();
$combo_HireDate->DateFormat = "mdy";
$combo_HireDate->MinYear = 1900;
$combo_HireDate->MaxYear = 2100;
$combo_HireDate->DefaultDate = parseMySQLDate('1', '1');
$combo_HireDate->MonthNames = $Translation['month names'];
$combo_HireDate->NamePrefix = 'HireDate';
// combobox: Country
$combo_Country = new Combo();
$combo_Country->ListType = 0;
$combo_Country->MultipleSeparator = ', ';
$combo_Country->ListBoxHeight = 10;
$combo_Country->RadiosPerLine = 1;
if (is_file(dirname(__FILE__) . '/hooks/employees.Country.csv')) {
$Country_data = addslashes(implode('', @file(dirname(__FILE__) . '/hooks/employees.Country.csv')));
$combo_Country->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions($Country_data)));
$combo_Country->ListData = $combo_Country->ListItem;
} else {
$combo_Country->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions("Afghanistan;;Albania;;Algeria;;American Samoa;;Andorra;;Angola;;Anguilla;;Antarctica;;Antigua, Barbuda;;Argentina;;Armenia;;Aruba;;Australia;;Austria;;Azerbaijan;;Bahamas;;Bahrain;;Bangladesh;;Barbados;;Belarus;;Belgium;;Belize;;Benin;;Bermuda;;Bhutan;;Bolivia;;Bosnia, Herzegovina;;Botswana;;Bouvet Is.;;Brazil;;Brunei Darussalam;;Bulgaria;;Burkina Faso;;Burundi;;Cambodia;;Cameroon;;Canada;;Canary Is.;;Cape Verde;;Cayman Is.;;Central African Rep.;;Chad;;Channel Islands;;Chile;;China;;Christmas Is.;;Cocos Is.;;Colombia;;Comoros;;Congo, D.R. Of;;Congo;;Cook Is.;;Costa Rica;;Croatia;;Cuba;;Cyprus;;Czech Republic;;Denmark;;Djibouti;;Dominica;;Dominican Republic;;Ecuador;;Egypt;;El Salvador;;Equatorial Guinea;;Eritrea;;Estonia;;Ethiopia;;Falkland Is.;;Faroe Is.;;Fiji;;Finland;;France;;French Guiana;;French Polynesia;;French Territories;;Gabon;;Gambia;;Georgia;;Germany;;Ghana;;Gibraltar;;Greece;;Greenland;;Grenada;;Guadeloupe;;Guam;;Guatemala;;Guernsey;;Guinea-bissau;;Guinea;;Guyana;;Haiti;;Heard, Mcdonald Is.;;Honduras;;Hong Kong;;Hungary;;Iceland;;India;;Indonesia;;Iran;;Iraq;;Ireland;;Israel;;Italy;;Ivory Coast;;Jamaica;;Japan;;Jersey;;Jordan;;Kazakhstan;;Kenya;;Kiribati;;Korea, D.P.R Of;;Korea, Rep. Of;;Kuwait;;Kyrgyzstan;;Lao Peoples D.R.;;Latvia;;Lebanon;;Lesotho;;Liberia;;Libyan Arab Jamahiriya;;Liechtenstein;;Lithuania;;Luxembourg;;Macao;;Macedonia, F.Y.R Of;;Madagascar;;Malawi;;Malaysia;;Maldives;;Mali;;Malta;;Mariana Islands;;Marshall Islands;;Martinique;;Mauritania;;Mauritius;;Mayotte;;Mexico;;Micronesia;;Moldova;;Monaco;;Mongolia;;Montserrat;;Morocco;;Mozambique;;Myanmar;;Namibia;;Nauru;;Nepal;;Netherlands Antilles;;Netherlands;;New Caledonia;;New Zealand;;Nicaragua;;Niger;;Nigeria;;Niue;;Norfolk Island;;Norway;;Oman;;Pakistan;;Palau;;Palestinian Terr.;;Panama;;Papua New Guinea;;Paraguay;;Peru;;Philippines;;Pitcairn;;Poland;;Portugal;;Puerto Rico;;Qatar;;Reunion;;Romania;;Russian Federation;;Rwanda;;Samoa;;San Marino;;Sao Tome, Principe;;Saudi Arabia;;Senegal;;Seychelles;;Sierra Leone;;Singapore;;Slovakia;;Slovenia;;Solomon Is.;;Somalia;;South Africa;;South Georgia;;South Sandwich Is.;;Spain;;Sri Lanka;;St. Helena;;St. Kitts, Nevis;;St. Lucia;;St. Pierre, Miquelon;;St. Vincent, Grenadines;;Sudan;;Suriname;;Svalbard, Jan Mayen;;Swaziland;;Sweden;;Switzerland;;Syrian Arab Republic;;Taiwan;;Tajikistan;;Tanzania;;Thailand;;Timor-leste;;Togo;;Tokelau;;Tonga;;Trinidad, Tobago;;Tunisia;;Turkey;;Turkmenistan;;Turks, Caicoss;;Tuvalu;;Uganda;;Ukraine;;United Arab Emirates;;United Kingdom;;United States;;Uruguay;;Uzbekistan;;Vanuatu;;Vatican City;;Venezuela;;Viet Nam;;Virgin Is. British;;Virgin Is. U.S.;;Wallis, Futuna;;Western Sahara;;Yemen;;Yugoslavia;;Zambia;;Zimbabwe")));
$combo_Country->ListData = $combo_Country->ListItem;
}
$combo_Country->SelectName = 'Country';
// combobox: ReportsTo
$combo_ReportsTo = new DataCombo();
if ($selected_id) {
// mm: check member permissions
if (!$arrPerm[2]) {
return "";
}
// mm: who is the owner?
$ownerGroupID = sqlValue("select groupID from membership_userrecords where tableName='employees' and pkValue='" . makeSafe($selected_id) . "'");
$ownerMemberID = sqlValue("select lcase(memberID) from membership_userrecords where tableName='employees' and pkValue='" . makeSafe($selected_id) . "'");
if ($arrPerm[2] == 1 && getLoggedMemberID() != $ownerMemberID) {
return "";
}
if ($arrPerm[2] == 2 && getLoggedGroupID() != $ownerGroupID) {
return "";
}
// can edit?
if ($arrPerm[3] == 1 && $ownerMemberID == getLoggedMemberID() || $arrPerm[3] == 2 && $ownerGroupID == getLoggedGroupID() || $arrPerm[3] == 3) {
$AllowUpdate = 1;
} else {
$AllowUpdate = 0;
}
$res = sql("select * from `employees` where `EmployeeID`='" . makeSafe($selected_id) . "'", $eo);
if (!($row = db_fetch_array($res))) {
return error_message($Translation['No records found']);
}
$urow = $row;
/* unsanitized data */
$hc = new CI_Input();
$row = $hc->xss_clean($row);
/* sanitize data */
$combo_BirthDate->DefaultDate = $row['BirthDate'];
$combo_HireDate->DefaultDate = $row['HireDate'];
$combo_Country->SelectedData = $row['Country'];
$combo_ReportsTo->SelectedData = $row['ReportsTo'];
} else {
$combo_Country->SelectedText = $_REQUEST['FilterField'][1] == '13' && $_REQUEST['FilterOperator'][1] == '<=>' ? get_magic_quotes_gpc() ? stripslashes($_REQUEST['FilterValue'][1]) : $_REQUEST['FilterValue'][1] : "";
$combo_ReportsTo->SelectedData = $filterer_ReportsTo;
}
$combo_Country->Render();
$combo_ReportsTo->HTML = $combo_ReportsTo->MatchText = '<span id="ReportsTo-container' . $rnd1 . '"></span>';
ob_start();
?>
<script>
// initial lookup values
var current_ReportsTo__RAND__ = { text: "", value: "<?php
//.........这里部分代码省略.........
示例7: Render
//.........这里部分代码省略.........
continue;
}
$class = "TableBody" . ($alt ? 'Selected' : '') . ($fNumeric ? 'Numeric' : '');
if ($Print_x != '') {
$this->HTML .= '<tr>';
}
if (!$Print_x) {
$this->HTML .= $SelectedID == $row[$FieldCountTV] ? '<tr class="active">' : '<tr>';
$checked = is_array($_POST['record_selector']) && in_array($row[$FieldCountTV], $_POST['record_selector']) ? ' checked' : '';
$this->HTML .= "<td class=\"text-center\"><input class=\"hidden-print record_selector\" type=\"checkbox\" id=\"record_selector_{$attr_id}\" name=\"record_selector[]\" value=\"{$attr_id}\"{$checked}></td>";
}
// templates
if ($rowTemplate != '') {
if ($this->AllowSelection == 1 && $SelectedID == $row[$FieldCountTV] && $selrowTemplate != '') {
$rowTemp = $selrowTemplate;
} else {
$rowTemp = $rowTemplate;
}
if ($this->AllowSelection == 1 && $SelectedID != $row[$FieldCountTV]) {
$rowTemp = str_replace('<%%SELECT%%>', "<a onclick=\"document.myform.SelectedField.value=this.parentNode.cellIndex; document.myform.SelectedID.value='" . addslashes($row[$FieldCountTV]) . "'; document.myform.submit(); return false;\" href=\"{$this->ScriptFileName}?SelectedID=" . htmlspecialchars($row[$FieldCountTV], ENT_QUOTES) . "\" class=\"{$class}\" style=\"display: block; padding:0px;\">", $rowTemp);
$rowTemp = str_replace('<%%ENDSELECT%%>', '</a>', $rowTemp);
} else {
$rowTemp = str_replace('<%%SELECT%%>', '', $rowTemp);
$rowTemp = str_replace('<%%ENDSELECT%%>', '', $rowTemp);
}
for ($j = 0; $j < $FieldCountTV; $j++) {
$fieldTVCaption = current(array_slice($this->QueryFieldsTV, $j, 1));
$fd = $hc->xss_clean(nl2br($row[$j]));
/* Sanitize output against XSS attacks */
/*
the TV template could contain field placeholders in the format
<%%FIELD_n%%> or <%%VALUE(Field name)%%>
*/
$rowTemp = str_replace("<%%FIELD_{$j}%%>", thisOr($fd), $rowTemp);
$rowTemp = str_replace("<%%VALUE({$fieldTVCaption})%%>", thisOr($fd), $rowTemp);
if (strpos($rowTemp, "<%%YOUTUBETHUMB({$fieldTVCaption})%%>") !== false) {
$rowTemp = str_replace("<%%YOUTUBETHUMB({$fieldTVCaption})%%>", thisOr(get_embed('youtube', $fd, '', '', 'thumbnail_url'), 'blank.gif'), $rowTemp);
}
if (strpos($rowTemp, "<%%GOOGLEMAPTHUMB({$fieldTVCaption})%%>") !== false) {
$rowTemp = str_replace("<%%GOOGLEMAPTHUMB({$fieldTVCaption})%%>", thisOr(get_embed('googlemap', $fd, '', '', 'thumbnail_url'), 'blank.gif'), $rowTemp);
}
if (thisOr($fd) == ' ' && preg_match('/<a href=".*? .*?<\\/a>/i', $rowTemp, $m)) {
$rowTemp = str_replace($m[0], '', $rowTemp);
}
}
if ($alt && $SelectedID != $row[$FieldCountTV]) {
$rowTemp = str_replace("TableBody", "TableBodySelected", $rowTemp);
$rowTemp = str_replace("TableBodyNumeric", "TableBodySelectedNumeric", $rowTemp);
$rowTemp = str_replace("SelectedSelected", "Selected", $rowTemp);
}
if ($SearchString != '') {
$rowTemp = highlight($SearchString, $rowTemp);
}
$this->HTML .= $rowTemp;
$rowTemp = '';
} else {
// end of templates
for ($j = 0; $j < $FieldCountTV; $j++) {
$fType = db_field_type($result, $j);
$fNumeric = stristr($fType, 'int') || stristr($fType, 'float') || stristr($fType, 'decimal') || stristr($fType, 'numeric') || stristr($fType, 'real') || stristr($fType, 'double') ? true : false;
if ($this->AllowSelection == 1) {
$sel1 = "<a href=\"{$this->ScriptFileName}?SelectedID=" . htmlspecialchars($row[$FieldCountTV], ENT_QUOTES) . "\" onclick=\"document.myform.SelectedID.value='" . addslashes($row[$FieldCountTV]) . "'; document.myform.submit(); return false;\" class=\"{$class}\" style=\"padding:0px;\">";
$sel2 = "</a>";
} else {
$sel1 = '';
$sel2 = '';
示例8: outcomes_form
function outcomes_form($selected_id = '', $AllowUpdate = 1, $AllowInsert = 1, $AllowDelete = 1, $ShowCancel = 0)
{
// function to return an editable form for a table records
// and fill it with data of record whose ID is $selected_id. If $selected_id
// is empty, an empty form is shown, with only an 'Add New'
// button displayed.
global $Translation;
// mm: get table permissions
$arrPerm = getTablePermissions('outcomes');
if (!$arrPerm[1] && $selected_id == '') {
return '';
}
// print preview?
$dvprint = false;
if ($selected_id && $_REQUEST['dvprint_x'] != '') {
$dvprint = true;
}
$filterer_outcome_area = thisOr(undo_magic_quotes($_REQUEST['filterer_outcome_area']), '');
// populate filterers, starting from children to grand-parents
// unique random identifier
$rnd1 = $dvprint ? rand(1000000, 9999999) : '';
// combobox: outcome_area
$combo_outcome_area = new DataCombo();
// combobox: strata
$combo_strata = new Combo();
$combo_strata->ListType = 0;
$combo_strata->MultipleSeparator = ', ';
$combo_strata->ListBoxHeight = 10;
$combo_strata->RadiosPerLine = 1;
if (is_file(dirname(__FILE__) . '/hooks/outcomes.strata.csv')) {
$strata_data = addslashes(implode('', @file(dirname(__FILE__) . '/hooks/outcomes.strata.csv')));
$combo_strata->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions($strata_data)));
$combo_strata->ListData = $combo_strata->ListItem;
} else {
$combo_strata->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions("Individuals;;Community, Sector & Society")));
$combo_strata->ListData = $combo_strata->ListItem;
}
$combo_strata->SelectName = 'strata';
if ($selected_id) {
// mm: check member permissions
if (!$arrPerm[2]) {
return "";
}
// mm: who is the owner?
$ownerGroupID = sqlValue("select groupID from membership_userrecords where tableName='outcomes' and pkValue='" . makeSafe($selected_id) . "'");
$ownerMemberID = sqlValue("select lcase(memberID) from membership_userrecords where tableName='outcomes' and pkValue='" . makeSafe($selected_id) . "'");
if ($arrPerm[2] == 1 && getLoggedMemberID() != $ownerMemberID) {
return "";
}
if ($arrPerm[2] == 2 && getLoggedGroupID() != $ownerGroupID) {
return "";
}
// can edit?
if ($arrPerm[3] == 1 && $ownerMemberID == getLoggedMemberID() || $arrPerm[3] == 2 && $ownerGroupID == getLoggedGroupID() || $arrPerm[3] == 3) {
$AllowUpdate = 1;
} else {
$AllowUpdate = 0;
}
$res = sql("select * from `outcomes` where `outcome_id`='" . makeSafe($selected_id) . "'", $eo);
$row = mysql_fetch_array($res);
$urow = $row;
/* unsanitized data */
$hc = new CI_Input();
$row = $hc->xss_clean($row);
/* sanitize data */
$combo_outcome_area->SelectedData = $row['outcome_area'];
$combo_strata->SelectedData = $row['strata'];
} else {
$combo_outcome_area->SelectedData = $filterer_outcome_area;
$combo_strata->SelectedText = $_REQUEST['FilterField'][1] == '4' && $_REQUEST['FilterOperator'][1] == '<=>' ? get_magic_quotes_gpc() ? stripslashes($_REQUEST['FilterValue'][1]) : $_REQUEST['FilterValue'][1] : "";
}
$combo_outcome_area->HTML = $combo_outcome_area->MatchText = '<span id="outcome_area-container' . $rnd1 . '"></span><input type="hidden" name="outcome_area" id="outcome_area' . $rnd1 . '">';
$combo_strata->Render();
ob_start();
?>
<script>
// initial lookup values
var current_outcome_area__RAND__ = { text: "", value: "<?php
echo addslashes($selected_id ? $urow['outcome_area'] : $filterer_outcome_area);
?>
"};
jQuery(function() {
outcome_area_reload__RAND__();
});
function outcome_area_reload__RAND__(){
<?php
if (($AllowUpdate || $AllowInsert) && !$dvprint) {
?>
jQuery("#outcome_area-container__RAND__").select2({
/* initial default value */
initSelection: function(e, c){
jQuery.ajax({
url: 'ajax_combo.php',
dataType: 'json',
data: { id: current_outcome_area__RAND__.value, t: 'outcomes', f: 'outcome_area' }
}).done(function(resp){
c({
//.........这里部分代码省略.........
示例9: residence_and_rental_history_form
function residence_and_rental_history_form($selected_id = '', $AllowUpdate = 1, $AllowInsert = 1, $AllowDelete = 1, $ShowCancel = 0)
{
// function to return an editable form for a table records
// and fill it with data of record whose ID is $selected_id. If $selected_id
// is empty, an empty form is shown, with only an 'Add New'
// button displayed.
global $Translation;
// mm: get table permissions
$arrPerm = getTablePermissions('residence_and_rental_history');
if (!$arrPerm[1] && $selected_id == '') {
return '';
}
$AllowInsert = $arrPerm[1] ? true : false;
// print preview?
$dvprint = false;
if ($selected_id && $_REQUEST['dvprint_x'] != '') {
$dvprint = true;
}
$filterer_tenant = thisOr(undo_magic_quotes($_REQUEST['filterer_tenant']), '');
// populate filterers, starting from children to grand-parents
// unique random identifier
$rnd1 = $dvprint ? rand(1000000, 9999999) : '';
// combobox: tenant
$combo_tenant = new DataCombo();
// combobox: duration_of_residency_from
$combo_duration_of_residency_from = new DateCombo();
$combo_duration_of_residency_from->DateFormat = "mdy";
$combo_duration_of_residency_from->MinYear = 1900;
$combo_duration_of_residency_from->MaxYear = 2100;
$combo_duration_of_residency_from->DefaultDate = parseMySQLDate('', '');
$combo_duration_of_residency_from->MonthNames = $Translation['month names'];
$combo_duration_of_residency_from->NamePrefix = 'duration_of_residency_from';
// combobox: to
$combo_to = new DateCombo();
$combo_to->DateFormat = "mdy";
$combo_to->MinYear = 1900;
$combo_to->MaxYear = 2100;
$combo_to->DefaultDate = parseMySQLDate('', '');
$combo_to->MonthNames = $Translation['month names'];
$combo_to->NamePrefix = 'to';
if ($selected_id) {
// mm: check member permissions
if (!$arrPerm[2]) {
return "";
}
// mm: who is the owner?
$ownerGroupID = sqlValue("select groupID from membership_userrecords where tableName='residence_and_rental_history' and pkValue='" . makeSafe($selected_id) . "'");
$ownerMemberID = sqlValue("select lcase(memberID) from membership_userrecords where tableName='residence_and_rental_history' and pkValue='" . makeSafe($selected_id) . "'");
if ($arrPerm[2] == 1 && getLoggedMemberID() != $ownerMemberID) {
return "";
}
if ($arrPerm[2] == 2 && getLoggedGroupID() != $ownerGroupID) {
return "";
}
// can edit?
if ($arrPerm[3] == 1 && $ownerMemberID == getLoggedMemberID() || $arrPerm[3] == 2 && $ownerGroupID == getLoggedGroupID() || $arrPerm[3] == 3) {
$AllowUpdate = 1;
} else {
$AllowUpdate = 0;
}
$res = sql("select * from `residence_and_rental_history` where `id`='" . makeSafe($selected_id) . "'", $eo);
if (!($row = db_fetch_array($res))) {
return error_message($Translation['No records found']);
}
$urow = $row;
/* unsanitized data */
$hc = new CI_Input();
$row = $hc->xss_clean($row);
/* sanitize data */
$combo_tenant->SelectedData = $row['tenant'];
$combo_duration_of_residency_from->DefaultDate = $row['duration_of_residency_from'];
$combo_to->DefaultDate = $row['to'];
} else {
$combo_tenant->SelectedData = $filterer_tenant;
}
$combo_tenant->HTML = '<span id="tenant-container' . $rnd1 . '"></span><input type="hidden" name="tenant" id="tenant' . $rnd1 . '">';
$combo_tenant->MatchText = '<span id="tenant-container-readonly' . $rnd1 . '"></span><input type="hidden" name="tenant" id="tenant' . $rnd1 . '">';
ob_start();
?>
<script>
// initial lookup values
var current_tenant__RAND__ = { text: "", value: "<?php
echo addslashes($selected_id ? $urow['tenant'] : $filterer_tenant);
?>
"};
jQuery(function() {
tenant_reload__RAND__();
});
function tenant_reload__RAND__(){
<?php
if (($AllowUpdate || $AllowInsert) && !$dvprint) {
?>
jQuery("#tenant-container__RAND__").select2({
/* initial default value */
initSelection: function(e, c){
jQuery.ajax({
url: 'ajax_combo.php',
//.........这里部分代码省略.........
示例10: properties_form
function properties_form($selected_id = '', $AllowUpdate = 1, $AllowInsert = 1, $AllowDelete = 1, $ShowCancel = 0)
{
// function to return an editable form for a table records
// and fill it with data of record whose ID is $selected_id. If $selected_id
// is empty, an empty form is shown, with only an 'Add New'
// button displayed.
global $Translation;
// mm: get table permissions
$arrPerm = getTablePermissions('properties');
if (!$arrPerm[1] && $selected_id == '') {
return '';
}
$AllowInsert = $arrPerm[1] ? true : false;
// print preview?
$dvprint = false;
if ($selected_id && $_REQUEST['dvprint_x'] != '') {
$dvprint = true;
}
$filterer_owner = thisOr(undo_magic_quotes($_REQUEST['filterer_owner']), '');
// populate filterers, starting from children to grand-parents
// unique random identifier
$rnd1 = $dvprint ? rand(1000000, 9999999) : '';
// combobox: type
$combo_type = new Combo();
$combo_type->ListType = 2;
$combo_type->MultipleSeparator = ', ';
$combo_type->ListBoxHeight = 10;
$combo_type->RadiosPerLine = 1;
if (is_file(dirname(__FILE__) . '/hooks/properties.type.csv')) {
$type_data = addslashes(implode('', @file(dirname(__FILE__) . '/hooks/properties.type.csv')));
$combo_type->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions($type_data)));
$combo_type->ListData = $combo_type->ListItem;
} else {
$combo_type->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions("Residential;;Commercial;;Condo/Townhome;;Multi-Family;;Single-Family;;stores;;office;;shops")));
$combo_type->ListData = $combo_type->ListItem;
}
$combo_type->SelectName = 'type';
$combo_type->AllowNull = false;
// combobox: owner
$combo_owner = new DataCombo();
// combobox: operating_account
$combo_operating_account = new Combo();
$combo_operating_account->ListType = 0;
$combo_operating_account->MultipleSeparator = ', ';
$combo_operating_account->ListBoxHeight = 10;
$combo_operating_account->RadiosPerLine = 1;
if (is_file(dirname(__FILE__) . '/hooks/properties.operating_account.csv')) {
$operating_account_data = addslashes(implode('', @file(dirname(__FILE__) . '/hooks/properties.operating_account.csv')));
$combo_operating_account->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions($operating_account_data)));
$combo_operating_account->ListData = $combo_operating_account->ListItem;
} else {
$combo_operating_account->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions("Operating bank account;;Security deposit bank account")));
$combo_operating_account->ListData = $combo_operating_account->ListItem;
}
$combo_operating_account->SelectName = 'operating_account';
// combobox: country
$combo_country = new Combo();
$combo_country->ListType = 0;
$combo_country->MultipleSeparator = ', ';
$combo_country->ListBoxHeight = 10;
$combo_country->RadiosPerLine = 1;
if (is_file(dirname(__FILE__) . '/hooks/properties.country.csv')) {
$country_data = addslashes(implode('', @file(dirname(__FILE__) . '/hooks/properties.country.csv')));
$combo_country->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions($country_data)));
$combo_country->ListData = $combo_country->ListItem;
} else {
$combo_country->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions("Afghanistan;;Albania;;Algeria;;American Samoa;;Andorra;;Angola;;Anguilla;;Antarctica;;Antigua, Barbuda;;Argentina;;Armenia;;Aruba;;Australia;;Austria;;Azerbaijan;;Bahamas;;Bahrain;;Bangladesh;;Barbados;;Belarus;;Belgium;;Belize;;Benin;;Bermuda;;Bhutan;;Bolivia;;Bosnia, Herzegovina;;Botswana;;Bouvet Is.;;Brazil;;Brunei Darussalam;;Bulgaria;;Burkina Faso;;Burundi;;Cambodia;;Cameroon;;Canada;;Canary Is.;;Cape Verde;;Cayman Is.;;Central African Rep.;;Chad;;Channel Islands;;Chile;;China;;Christmas Is.;;Cocos Is.;;Colombia;;Comoros;;Congo, D.R. Of;;Congo;;Cook Is.;;Costa Rica;;Croatia;;Cuba;;Cyprus;;Czech Republic;;Denmark;;Djibouti;;Dominica;;Dominican Republic;;Ecuador;;Egypt;;El Salvador;;Equatorial Guinea;;Eritrea;;Estonia;;Ethiopia;;Falkland Is.;;Faroe Is.;;Fiji;;Finland;;France;;French Guiana;;French Polynesia;;French Territories;;Gabon;;Gambia;;Georgia;;Germany;;Ghana;;Gibraltar;;Greece;;Greenland;;Grenada;;Guadeloupe;;Guam;;Guatemala;;Guernsey;;Guinea-bissau;;Guinea;;Guyana;;Haiti;;Heard, Mcdonald Is.;;Honduras;;Hong Kong;;Hungary;;Iceland;;India;;Indonesia;;Iran;;Iraq;;Ireland;;Israel;;Italy;;Ivory Coast;;Jamaica;;Japan;;Jersey;;Jordan;;Kazakhstan;;Kenya;;Kiribati;;Korea, D.P.R Of;;Korea, Rep. Of;;Kuwait;;Kyrgyzstan;;Lao Peoples D.R.;;Latvia;;Lebanon;;Lesotho;;Liberia;;Libyan Arab Jamahiriya;;Liechtenstein;;Lithuania;;Luxembourg;;Macao;;Macedonia, F.Y.R Of;;Madagascar;;Malawi;;Malaysia;;Maldives;;Mali;;Malta;;Mariana Islands;;Marshall Islands;;Martinique;;Mauritania;;Mauritius;;Mayotte;;Mexico;;Micronesia;;Moldova;;Monaco;;Mongolia;;Montserrat;;Morocco;;Mozambique;;Myanmar;;Namibia;;Nauru;;Nepal;;Netherlands Antilles;;Netherlands;;New Caledonia;;New Zealand;;Nicaragua;;Niger;;Nigeria;;Niue;;Norfolk Island;;Norway;;Oman;;Pakistan;;Palau;;Palestinian Terr.;;Panama;;Papua New Guinea;;Paraguay;;Peru;;Philippines;;Pitcairn;;Poland;;Portugal;;Puerto Rico;;Qatar;;Reunion;;Romania;;Russian Federation;;Rwanda;;Samoa;;San Marino;;Sao Tome, Principe;;Saudi Arabia;;Senegal;;Seychelles;;Sierra Leone;;Singapore;;Slovakia;;Slovenia;;Solomon Is.;;Somalia;;South Africa;;South Georgia;;South Sandwich Is.;;Spain;;Sri Lanka;;St. Helena;;St. Kitts, Nevis;;St. Lucia;;St. Pierre, Miquelon;;St. Vincent, Grenadines;;Sudan;;Suriname;;Svalbard, Jan Mayen;;Swaziland;;Sweden;;Switzerland;;Syrian Arab Republic;;Taiwan;;Tajikistan;;Tanzania;;Thailand;;Timor-leste;;Togo;;Tokelau;;Tonga;;Trinidad, Tobago;;Tunisia;;Turkey;;Turkmenistan;;Turks, Caicoss;;Tuvalu;;Uganda;;Ukraine;;United Arab Emirates;;United Kingdom;;United States;;Uruguay;;Uzbekistan;;Vanuatu;;Vatican City;;Venezuela;;Viet Nam;;Virgin Is. British;;Virgin Is. U.S.;;Wallis, Futuna;;Western Sahara;;Yemen;;Yugoslavia;;Zambia;;Zimbabwe")));
$combo_country->ListData = $combo_country->ListItem;
}
$combo_country->SelectName = 'country';
// combobox: State
$combo_State = new Combo();
$combo_State->ListType = 0;
$combo_State->MultipleSeparator = ', ';
$combo_State->ListBoxHeight = 10;
$combo_State->RadiosPerLine = 1;
if (is_file(dirname(__FILE__) . '/hooks/properties.State.csv')) {
$State_data = addslashes(implode('', @file(dirname(__FILE__) . '/hooks/properties.State.csv')));
$combo_State->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions($State_data)));
$combo_State->ListData = $combo_State->ListItem;
} else {
$combo_State->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions("AL;;AK;;AS;;AZ;;AR;;CA;;CO;;CT;;DE;;DC;;FM;;FL;;GA;;GU;;HI;;ID;;IL;;IN;;IA;;KS;;KY;;LA;;ME;;MH;;MD;;MA;;MI;;MN;;MS;;MO;;MT;;NE;;NV;;NH;;NJ;;NM;;NY;;NC;;ND;;MP;;OH;;OK;;OR;;PW;;PA;;PR;;RI;;SC;;SD;;TN;;TX;;UT;;VT;;VI;;VA;;WA;;WV;;WI;;WY")));
$combo_State->ListData = $combo_State->ListItem;
}
$combo_State->SelectName = 'State';
if ($selected_id) {
// mm: check member permissions
if (!$arrPerm[2]) {
return "";
}
// mm: who is the owner?
$ownerGroupID = sqlValue("select groupID from membership_userrecords where tableName='properties' and pkValue='" . makeSafe($selected_id) . "'");
$ownerMemberID = sqlValue("select lcase(memberID) from membership_userrecords where tableName='properties' and pkValue='" . makeSafe($selected_id) . "'");
if ($arrPerm[2] == 1 && getLoggedMemberID() != $ownerMemberID) {
return "";
}
if ($arrPerm[2] == 2 && getLoggedGroupID() != $ownerGroupID) {
return "";
}
// can edit?
//.........这里部分代码省略.........
示例11: Render
//.........这里部分代码省略.........
while (($row = mysql_fetch_array($result)) && $i < $FirstRecord + $this->RecordsPerPage) {
$alt = ($i - $FirstRecord) % 2;
if ($PrintTV && $_POST["select_{$row[$FieldCountTV]}"] != 1) {
continue;
}
$class = "TableBody" . ($alt ? "Selected" : "") . ($fNumeric ? "Numeric" : "");
$this->HTML .= "\t<tr onMouseOver=\"colorize(this, '" . $this->HighlightColor . "');\" onMouseOut=\"colorize(this, '');\">";
$this->HTML .= "<td class={$class} valign=top align=right width=12>" . ($SelectedID == $row[$FieldCountTV] ? "<font color=red>⇒</font>" : " ") . "</td>";
if ($this->AllowPrintingMultiSelection && $Print_x != '') {
$this->HTML .= "<td class=\"{$class} displayOnly\" valign=\"top\" align=\"left\" width=\"12\"><input type=\"checkbox\" id=\"select_{$row[$FieldCountTV]}\" name=\"select_{$row[$FieldCountTV]}\" value=\"1\" onclick=\"if(\$('select_{$row[$FieldCountTV]}').checked) countSelected++; else countSelected--;\"></td>";
$toggleAllScript .= "\$('select_{$row[$FieldCountTV]}').checked=s;";
}
// templates
if ($rowTemplate != '') {
if ($this->AllowSelection == 1 && $SelectedID == $row[$FieldCountTV] && $selrowTemplate != "") {
$rowTemp = $selrowTemplate;
} else {
$rowTemp = $rowTemplate;
}
if ($this->AllowSelection == 1 && $SelectedID != $row[$FieldCountTV]) {
$rowTemp = str_replace('<%%SELECT%%>', "<a onclick=\"document.myform.SelectedField.value=this.parentNode.cellIndex; document.myform.SelectedID.value='" . addslashes($row[$FieldCountTV]) . "'; document.myform.submit(); return false;\" href=\"{$this->ScriptFileName}?SelectedID=" . htmlspecialchars($row[$FieldCountTV], ENT_QUOTES) . "\" class=\"{$class}\" style=\"display: block; padding:0px;\">", $rowTemp);
$rowTemp = str_replace('<%%ENDSELECT%%>', '</a>', $rowTemp);
} else {
$rowTemp = str_replace('<%%SELECT%%>', "", $rowTemp);
$rowTemp = str_replace('<%%ENDSELECT%%>', '', $rowTemp);
}
for ($j = 0; $j < $FieldCountTV; $j++) {
$fieldTVCaption = current(array_slice($this->QueryFieldsTV, $j, 1));
$fd = $hc->clean($row[$j]);
/*
the TV template could contain field placeholders in the format
<%%FIELD_n%%> or <%%VALUE(Field Caption)%%>
*/
$rowTemp = str_replace("<%%FIELD_{$j}%%>", thisOr($fd), $rowTemp);
$rowTemp = str_replace("<%%VALUE({$fieldTVCaption})%%>", thisOr($fd), $rowTemp);
if (thisOr($fd) == ' ' && preg_match('/<a href=".*? .*?<\\/a>/i', $rowTemp, $m)) {
$rowTemp = str_replace($m[0], '', $rowTemp);
}
}
if ($alt && $SelectedID != $row[$FieldCountTV]) {
$rowTemp = str_replace("TableBody", "TableBodySelected", $rowTemp);
$rowTemp = str_replace("TableBodyNumeric", "TableBodySelectedNumeric", $rowTemp);
$rowTemp = str_replace("SelectedSelected", "Selected", $rowTemp);
}
if ($SearchString != '') {
$rowTemp = highlight($SearchString, $rowTemp);
}
$this->HTML .= $rowTemp;
$rowTemp = '';
} else {
// end of templates
for ($j = 0; $j < $FieldCountTV; $j++) {
$fType = mysql_field_type($result, $j);
$fNumeric = stristr($fType, 'int') || stristr($fType, 'float') || stristr($fType, 'decimal') || stristr($fType, 'numeric') || stristr($fType, 'real') || stristr($fType, 'double') ? true : false;
if ($this->AllowSelection == 1) {
$sel1 = "<a href=\"{$this->ScriptFileName}?SelectedID=" . htmlspecialchars($row[$FieldCountTV], ENT_QUOTES) . "\" onclick=\"document.myform.SelectedID.value='" . addslashes($row[$FieldCountTV]) . "'; document.myform.submit(); return false;\" class=\"{$class}\" style=\"padding:0px;\">";
$sel2 = "</a>";
} else {
$sel1 = "";
$sel2 = "";
}
$this->HTML .= "<td valign=top class={$class}><div class={$class}> {$sel1}" . $row[$j] . "{$sel2} </div></td>";
}
}
$this->HTML .= "</tr>\n";
$i++;
示例12: entries_form
function entries_form($selected_id = '', $AllowUpdate = 1, $AllowInsert = 1, $AllowDelete = 1, $ShowCancel = 0)
{
// function to return an editable form for a table records
// and fill it with data of record whose ID is $selected_id. If $selected_id
// is empty, an empty form is shown, with only an 'Add New'
// button displayed.
global $Translation;
// mm: get table permissions
$arrPerm = getTablePermissions('entries');
if (!$arrPerm[1] && $selected_id == '') {
return '';
}
// print preview?
$dvprint = false;
if ($selected_id && $_REQUEST['dvprint_x'] != '') {
$dvprint = true;
}
$filterer_report = thisOr(undo_magic_quotes($_REQUEST['filterer_report']), '');
$filterer_outcome = thisOr(undo_magic_quotes($_REQUEST['filterer_outcome']), '');
$filterer_indicator = thisOr(undo_magic_quotes($_REQUEST['filterer_indicator']), '');
$filterer_beneficiary_group = thisOr(undo_magic_quotes($_REQUEST['filterer_beneficiary_group']), '');
// populate filterers, starting from children to grand-parents
if ($filterer_indicator && !$filterer_outcome) {
$filterer_outcome = sqlValue("select outcome from indicators where indicator_id='" . makeSafe($filterer_indicator) . "'");
}
// unique random identifier
$rnd1 = $dvprint ? rand(1000000, 9999999) : '';
// combobox: created
$combo_created = new DateCombo();
$combo_created->DateFormat = "dmy";
$combo_created->MinYear = 1900;
$combo_created->MaxYear = 2100;
$combo_created->DefaultDate = parseMySQLDate('<%%creationDate%%>', '<%%creationDate%%>');
$combo_created->MonthNames = $Translation['month names'];
$combo_created->NamePrefix = 'created';
// combobox: report
$combo_report = new DataCombo();
// combobox: outcome
$combo_outcome = new DataCombo();
// combobox: indicator, filterable by: outcome
$combo_indicator = new DataCombo();
// combobox: beneficiary_group
$combo_beneficiary_group = new DataCombo();
// combobox: beneficiary_group_relevance
$combo_beneficiary_group_relevance = new Combo();
$combo_beneficiary_group_relevance->ListType = 0;
$combo_beneficiary_group_relevance->MultipleSeparator = ', ';
$combo_beneficiary_group_relevance->ListBoxHeight = 10;
$combo_beneficiary_group_relevance->RadiosPerLine = 1;
if (is_file(dirname(__FILE__) . '/hooks/entries.beneficiary_group_relevance.csv')) {
$beneficiary_group_relevance_data = addslashes(implode('', @file(dirname(__FILE__) . '/hooks/entries.beneficiary_group_relevance.csv')));
$combo_beneficiary_group_relevance->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions($beneficiary_group_relevance_data)));
$combo_beneficiary_group_relevance->ListData = $combo_beneficiary_group_relevance->ListItem;
} else {
$combo_beneficiary_group_relevance->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions("1;;2;;3;;4;;5")));
$combo_beneficiary_group_relevance->ListData = $combo_beneficiary_group_relevance->ListItem;
}
$combo_beneficiary_group_relevance->SelectName = 'beneficiary_group_relevance';
// combobox: reliability
$combo_reliability = new Combo();
$combo_reliability->ListType = 0;
$combo_reliability->MultipleSeparator = ', ';
$combo_reliability->ListBoxHeight = 10;
$combo_reliability->RadiosPerLine = 1;
if (is_file(dirname(__FILE__) . '/hooks/entries.reliability.csv')) {
$reliability_data = addslashes(implode('', @file(dirname(__FILE__) . '/hooks/entries.reliability.csv')));
$combo_reliability->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions($reliability_data)));
$combo_reliability->ListData = $combo_reliability->ListItem;
} else {
$combo_reliability->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions("1;;2;;3;;4;;5")));
$combo_reliability->ListData = $combo_reliability->ListItem;
}
$combo_reliability->SelectName = 'reliability';
// combobox: intentionality
$combo_intentionality = new Combo();
$combo_intentionality->ListType = 0;
$combo_intentionality->MultipleSeparator = ', ';
$combo_intentionality->ListBoxHeight = 10;
$combo_intentionality->RadiosPerLine = 1;
if (is_file(dirname(__FILE__) . '/hooks/entries.intentionality.csv')) {
$intentionality_data = addslashes(implode('', @file(dirname(__FILE__) . '/hooks/entries.intentionality.csv')));
$combo_intentionality->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions($intentionality_data)));
$combo_intentionality->ListData = $combo_intentionality->ListItem;
} else {
$combo_intentionality->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions("1;;2;;3;;4;;5")));
$combo_intentionality->ListData = $combo_intentionality->ListItem;
}
$combo_intentionality->SelectName = 'intentionality';
// combobox: equivalence
$combo_equivalence = new Combo();
$combo_equivalence->ListType = 0;
$combo_equivalence->MultipleSeparator = ', ';
$combo_equivalence->ListBoxHeight = 10;
$combo_equivalence->RadiosPerLine = 1;
if (is_file(dirname(__FILE__) . '/hooks/entries.equivalence.csv')) {
$equivalence_data = addslashes(implode('', @file(dirname(__FILE__) . '/hooks/entries.equivalence.csv')));
$combo_equivalence->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions($equivalence_data)));
$combo_equivalence->ListData = $combo_equivalence->ListItem;
} else {
$combo_equivalence->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions("1;;2;;3;;4;;5")));
//.........这里部分代码省略.........
示例13: units_form
function units_form($selected_id = '', $AllowUpdate = 1, $AllowInsert = 1, $AllowDelete = 1, $ShowCancel = 0)
{
// function to return an editable form for a table records
// and fill it with data of record whose ID is $selected_id. If $selected_id
// is empty, an empty form is shown, with only an 'Add New'
// button displayed.
global $Translation;
// mm: get table permissions
$arrPerm = getTablePermissions('units');
if (!$arrPerm[1] && $selected_id == '') {
return '';
}
$AllowInsert = $arrPerm[1] ? true : false;
// print preview?
$dvprint = false;
if ($selected_id && $_REQUEST['dvprint_x'] != '') {
$dvprint = true;
}
$filterer_property = thisOr(undo_magic_quotes($_REQUEST['filterer_property']), '');
// populate filterers, starting from children to grand-parents
// unique random identifier
$rnd1 = $dvprint ? rand(1000000, 9999999) : '';
// combobox: property
$combo_property = new DataCombo();
// combobox: status
$combo_status = new Combo();
$combo_status->ListType = 2;
$combo_status->MultipleSeparator = ', ';
$combo_status->ListBoxHeight = 10;
$combo_status->RadiosPerLine = 1;
if (is_file(dirname(__FILE__) . '/hooks/units.status.csv')) {
$status_data = addslashes(implode('', @file(dirname(__FILE__) . '/hooks/units.status.csv')));
$combo_status->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions($status_data)));
$combo_status->ListData = $combo_status->ListItem;
} else {
$combo_status->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions("Occupied;;Listed;;Unlisted")));
$combo_status->ListData = $combo_status->ListItem;
}
$combo_status->SelectName = 'status';
$combo_status->AllowNull = false;
// combobox: features
$combo_features = new Combo();
$combo_features->ListType = 3;
$combo_features->MultipleSeparator = ', ';
$combo_features->ListBoxHeight = 10;
$combo_features->RadiosPerLine = 1;
if (is_file(dirname(__FILE__) . '/hooks/units.features.csv')) {
$features_data = addslashes(implode('', @file(dirname(__FILE__) . '/hooks/units.features.csv')));
$combo_features->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions($features_data)));
$combo_features->ListData = $combo_features->ListItem;
} else {
$combo_features->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions("Cable ready;; Micorwave;;Hardwood floors;; High speed internet;;Air conditioning;;Refrigerator;;Dishwasher;;Walk-in closets;;Balcony;;Deck;;Patio;;Garage parking;;Carport;;Fenced yard;;Laundry room / hookups;; Fireplace;;Oven / range;;Heat - electric;; Heat - gas;; Heat - oil")));
$combo_features->ListData = $combo_features->ListItem;
}
$combo_features->SelectName = 'features';
if ($selected_id) {
// mm: check member permissions
if (!$arrPerm[2]) {
return "";
}
// mm: who is the owner?
$ownerGroupID = sqlValue("select groupID from membership_userrecords where tableName='units' and pkValue='" . makeSafe($selected_id) . "'");
$ownerMemberID = sqlValue("select lcase(memberID) from membership_userrecords where tableName='units' and pkValue='" . makeSafe($selected_id) . "'");
if ($arrPerm[2] == 1 && getLoggedMemberID() != $ownerMemberID) {
return "";
}
if ($arrPerm[2] == 2 && getLoggedGroupID() != $ownerGroupID) {
return "";
}
// can edit?
if ($arrPerm[3] == 1 && $ownerMemberID == getLoggedMemberID() || $arrPerm[3] == 2 && $ownerGroupID == getLoggedGroupID() || $arrPerm[3] == 3) {
$AllowUpdate = 1;
} else {
$AllowUpdate = 0;
}
$res = sql("select * from `units` where `id`='" . makeSafe($selected_id) . "'", $eo);
if (!($row = db_fetch_array($res))) {
return error_message($Translation['No records found']);
}
$urow = $row;
/* unsanitized data */
$hc = new CI_Input();
$row = $hc->xss_clean($row);
/* sanitize data */
$combo_property->SelectedData = $row['property'];
$combo_status->SelectedData = $row['status'];
$combo_features->SelectedData = $row['features'];
} else {
$combo_property->SelectedData = $filterer_property;
$combo_status->SelectedText = $_REQUEST['FilterField'][1] == '5' && $_REQUEST['FilterOperator'][1] == '<=>' ? get_magic_quotes_gpc() ? stripslashes($_REQUEST['FilterValue'][1]) : $_REQUEST['FilterValue'][1] : "";
}
$combo_property->HTML = '<span id="property-container' . $rnd1 . '"></span><input type="hidden" name="property" id="property' . $rnd1 . '">';
$combo_property->MatchText = '<span id="property-container-readonly' . $rnd1 . '"></span><input type="hidden" name="property" id="property' . $rnd1 . '">';
$combo_status->Render();
$combo_features->Render();
ob_start();
?>
<script>
// initial lookup values
//.........这里部分代码省略.........
示例14: duck_mrs2016_form
function duck_mrs2016_form($selected_id = '', $AllowUpdate = 1, $AllowInsert = 1, $AllowDelete = 1, $ShowCancel = 0)
{
// function to return an editable form for a table records
// and fill it with data of record whose ID is $selected_id. If $selected_id
// is empty, an empty form is shown, with only an 'Add New'
// button displayed.
global $Translation;
// mm: get table permissions
$arrPerm = getTablePermissions('duck_mrs2016');
if (!$arrPerm[1] && $selected_id == '') {
return '';
}
$AllowInsert = $arrPerm[1] ? true : false;
// print preview?
$dvprint = false;
if ($selected_id && $_REQUEST['dvprint_x'] != '') {
$dvprint = true;
}
$filterer_transaction_id = thisOr(undo_magic_quotes($_REQUEST['filterer_transaction_id']), '');
// populate filterers, starting from children to grand-parents
// unique random identifier
$rnd1 = $dvprint ? rand(1000000, 9999999) : '';
// combobox: transaction_id
$combo_transaction_id = new DataCombo();
if ($selected_id) {
// mm: check member permissions
if (!$arrPerm[2]) {
return "";
}
// mm: who is the owner?
$ownerGroupID = sqlValue("select groupID from membership_userrecords where tableName='duck_mrs2016' and pkValue='" . makeSafe($selected_id) . "'");
$ownerMemberID = sqlValue("select lcase(memberID) from membership_userrecords where tableName='duck_mrs2016' and pkValue='" . makeSafe($selected_id) . "'");
if ($arrPerm[2] == 1 && getLoggedMemberID() != $ownerMemberID) {
return "";
}
if ($arrPerm[2] == 2 && getLoggedGroupID() != $ownerGroupID) {
return "";
}
// can edit?
if ($arrPerm[3] == 1 && $ownerMemberID == getLoggedMemberID() || $arrPerm[3] == 2 && $ownerGroupID == getLoggedGroupID() || $arrPerm[3] == 3) {
$AllowUpdate = 1;
} else {
$AllowUpdate = 0;
}
$res = sql("select * from `duck_mrs2016` where `duck_id`='" . makeSafe($selected_id) . "'", $eo);
if (!($row = db_fetch_array($res))) {
return error_message($Translation['No records found']);
}
$urow = $row;
/* unsanitized data */
$hc = new CI_Input();
$row = $hc->xss_clean($row);
/* sanitize data */
$combo_transaction_id->SelectedData = $row['transaction_id'];
} else {
$combo_transaction_id->SelectedData = $filterer_transaction_id;
}
$combo_transaction_id->HTML = '<span id="transaction_id-container' . $rnd1 . '"></span><input type="hidden" name="transaction_id" id="transaction_id' . $rnd1 . '" value="' . htmlspecialchars($combo_transaction_id->SelectedData, ENT_QUOTES, 'iso-8859-1') . '">';
$combo_transaction_id->MatchText = '<span id="transaction_id-container-readonly' . $rnd1 . '"></span><input type="hidden" name="transaction_id" id="transaction_id' . $rnd1 . '" value="' . htmlspecialchars($combo_transaction_id->SelectedData, ENT_QUOTES, 'iso-8859-1') . '">';
ob_start();
?>
<script>
// initial lookup values
var current_transaction_id__RAND__ = { text: "", value: "<?php
echo addslashes($selected_id ? $urow['transaction_id'] : $filterer_transaction_id);
?>
"};
jQuery(function() {
if(typeof(transaction_id_reload__RAND__) == 'function') transaction_id_reload__RAND__();
});
function transaction_id_reload__RAND__(){
<?php
if (($AllowUpdate || $AllowInsert) && !$dvprint) {
?>
jQuery("#transaction_id-container__RAND__").select2({
/* initial default value */
initSelection: function(e, c){
jQuery.ajax({
url: 'ajax_combo.php',
dataType: 'json',
data: { id: current_transaction_id__RAND__.value, t: 'duck_mrs2016', f: 'transaction_id' }
}).done(function(resp){
c({
id: resp.results[0].id,
text: resp.results[0].text
});
jQuery('[name="transaction_id"]').val(resp.results[0].id);
jQuery('[id=transaction_id-container-readonly__RAND__]').html('<span id="transaction_id-match-text">' + resp.results[0].text + '</span>');
if(typeof(transaction_id_update_autofills__RAND__) == 'function') transaction_id_update_autofills__RAND__();
});
},
width: ($j('fieldset .col-xs-11').width() - 99) + 'px',
formatNoMatches: function(term){ return '<?php
echo addslashes($Translation['No matches found!']);
?>
//.........这里部分代码省略.........
示例15: companies_form
function companies_form($selected_id = '', $AllowUpdate = 1, $AllowInsert = 1, $AllowDelete = 1, $ShowCancel = 0)
{
// function to return an editable form for a table records
// and fill it with data of record whose ID is $selected_id. If $selected_id
// is empty, an empty form is shown, with only an 'Add New'
// button displayed.
global $Translation;
// mm: get table permissions
$arrPerm = getTablePermissions('companies');
if (!$arrPerm[1] && $selected_id == '') {
return '';
}
// print preview?
$dvprint = false;
if ($selected_id && $_REQUEST['dvprint_x'] != '') {
$dvprint = true;
}
$filterer_client = thisOr(undo_magic_quotes($_REQUEST['filterer_client']), '');
$filterer_sic_code = thisOr(undo_magic_quotes($_REQUEST['filterer_sic_code']), '');
// populate filterers, starting from children to grand-parents
// unique random identifier
$rnd1 = $dvprint ? rand(1000000, 9999999) : '';
// combobox: client
$combo_client = new DataCombo();
// combobox: industry
$combo_industry = new Combo();
$combo_industry->ListType = 0;
$combo_industry->MultipleSeparator = ', ';
$combo_industry->ListBoxHeight = 10;
$combo_industry->RadiosPerLine = 1;
if (is_file(dirname(__FILE__) . '/hooks/companies.industry.csv')) {
$industry_data = addslashes(implode('', @file(dirname(__FILE__) . '/hooks/companies.industry.csv')));
$combo_industry->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions($industry_data)));
$combo_industry->ListData = $combo_industry->ListItem;
} else {
$combo_industry->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions("Automobiles and parts;;Business services;;Carbon offsetting and trading;;Charitable services and fundraising;;Chemicals;;Clothing retail;;Construction;;Consulting;;Consumer electronics;;Consumer goods and services (other);;Eating and drinking places;;Education;;Energy and Water;;Financial services;;Food and beverages retail;;Food producers;;Forestry and paper;;Health;;Household goods;;Internet platforms;;Leisure goods;;Media;;Other;;Personal goods;;Recycling and waste management;;Residential and commercial property;;Retail (general);;Telecoms;;Training and employment;;Transport;;Travel, tourism and leisure")));
$combo_industry->ListData = $combo_industry->ListItem;
}
$combo_industry->SelectName = 'industry';
// combobox: country_hq
$combo_country_hq = new Combo();
$combo_country_hq->ListType = 0;
$combo_country_hq->MultipleSeparator = ', ';
$combo_country_hq->ListBoxHeight = 10;
$combo_country_hq->RadiosPerLine = 1;
if (is_file(dirname(__FILE__) . '/hooks/companies.country_hq.csv')) {
$country_hq_data = addslashes(implode('', @file(dirname(__FILE__) . '/hooks/companies.country_hq.csv')));
$combo_country_hq->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions($country_hq_data)));
$combo_country_hq->ListData = $combo_country_hq->ListItem;
} else {
$combo_country_hq->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions("Afghanistan;;Albania;;Algeria;;American Samoa;;Andorra;;Angola;;Anguilla;;Antarctica;;Antigua, Barbuda;;Argentina;;Armenia;;Aruba;;Australia;;Austria;;Azerbaijan;;Bahamas;;Bahrain;;Bangladesh;;Barbados;;Belarus;;Belgium;;Belize;;Benin;;Bermuda;;Bhutan;;Bolivia;;Bosnia, Herzegovina;;Botswana;;Bouvet Is.;;Brazil;;Brunei Darussalam;;Bulgaria;;Burkina Faso;;Burundi;;Cambodia;;Cameroon;;Canada;;Canary Is.;;Cape Verde;;Cayman Is.;;Central African Rep.;;Chad;;Channel Islands;;Chile;;China;;Christmas Is.;;Cocos Is.;;Colombia;;Comoros;;Congo, D.R. Of;;Congo;;Cook Is.;;Costa Rica;;Croatia;;Cuba;;Cyprus;;Czech Republic;;Denmark;;Djibouti;;Dominica;;Dominican Republic;;Ecuador;;Egypt;;El Salvador;;Equatorial Guinea;;Eritrea;;Estonia;;Ethiopia;;Falkland Is.;;Faroe Is.;;Fiji;;Finland;;France;;French Guiana;;French Polynesia;;French Territories;;Gabon;;Gambia;;Georgia;;Germany;;Ghana;;Gibraltar;;Greece;;Greenland;;Grenada;;Guadeloupe;;Guam;;Guatemala;;Guernsey;;Guinea-bissau;;Guinea;;Guyana;;Haiti;;Heard, Mcdonald Is.;;Honduras;;Hong Kong;;Hungary;;Iceland;;India;;Indonesia;;Iran;;Iraq;;Ireland;;Israel;;Italy;;Ivory Coast;;Jamaica;;Japan;;Jersey;;Jordan;;Kazakhstan;;Kenya;;Kiribati;;Korea, D.P.R Of;;Korea, Rep. Of;;Kuwait;;Kyrgyzstan;;Lao Peoples D.R.;;Latvia;;Lebanon;;Lesotho;;Liberia;;Libyan Arab Jamahiriya;;Liechtenstein;;Lithuania;;Luxembourg;;Macao;;Macedonia, F.Y.R Of;;Madagascar;;Malawi;;Malaysia;;Maldives;;Mali;;Malta;;Mariana Islands;;Marshall Islands;;Martinique;;Mauritania;;Mauritius;;Mayotte;;Mexico;;Micronesia;;Moldova;;Monaco;;Mongolia;;Montserrat;;Morocco;;Mozambique;;Myanmar;;Namibia;;Nauru;;Nepal;;Netherlands Antilles;;Netherlands;;New Caledonia;;New Zealand;;Nicaragua;;Niger;;Nigeria;;Niue;;Norfolk Island;;Norway;;Oman;;Pakistan;;Palau;;Palestinian Terr.;;Panama;;Papua New Guinea;;Paraguay;;Peru;;Philippines;;Pitcairn;;Poland;;Portugal;;Puerto Rico;;Qatar;;Reunion;;Romania;;Russian Federation;;Rwanda;;Samoa;;San Marino;;Sao Tome, Principe;;Saudi Arabia;;Senegal;;Seychelles;;Sierra Leone;;Singapore;;Slovakia;;Slovenia;;Solomon Is.;;Somalia;;South Africa;;South Georgia;;South Sandwich Is.;;Spain;;Sri Lanka;;St. Helena;;St. Kitts, Nevis;;St. Lucia;;St. Pierre, Miquelon;;St. Vincent, Grenadines;;Sudan;;Suriname;;Svalbard, Jan Mayen;;Swaziland;;Sweden;;Switzerland;;Syrian Arab Republic;;Taiwan;;Tajikistan;;Tanzania;;Thailand;;Timor-leste;;Togo;;Tokelau;;Tonga;;Trinidad, Tobago;;Tunisia;;Turkey;;Turkmenistan;;Turks, Caicoss;;Tuvalu;;Uganda;;Ukraine;;United Arab Emirates;;United Kingdom;;United States;;Uruguay;;Uzbekistan;;Vanuatu;;Vatican City;;Venezuela;;Viet Nam;;Virgin Is. British;;Virgin Is. U.S.;;Wallis, Futuna;;Western Sahara;;Yemen;;Yugoslavia;;Zambia;;Zimbabwe")));
$combo_country_hq->ListData = $combo_country_hq->ListItem;
}
$combo_country_hq->SelectName = 'country_hq';
// combobox: country_operations
$combo_country_operations = new Combo();
$combo_country_operations->ListType = 3;
$combo_country_operations->MultipleSeparator = ', ';
$combo_country_operations->ListBoxHeight = 10;
$combo_country_operations->RadiosPerLine = 1;
if (is_file(dirname(__FILE__) . '/hooks/companies.country_operations.csv')) {
$country_operations_data = addslashes(implode('', @file(dirname(__FILE__) . '/hooks/companies.country_operations.csv')));
$combo_country_operations->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions($country_operations_data)));
$combo_country_operations->ListData = $combo_country_operations->ListItem;
} else {
$combo_country_operations->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions("Afghanistan;;Albania;;Algeria;;American Samoa;;Andorra;;Angola;;Anguilla;;Antarctica;;Antigua, Barbuda;;Argentina;;Armenia;;Aruba;;Australia;;Austria;;Azerbaijan;;Bahamas;;Bahrain;;Bangladesh;;Barbados;;Belarus;;Belgium;;Belize;;Benin;;Bermuda;;Bhutan;;Bolivia;;Bosnia, Herzegovina;;Botswana;;Bouvet Is.;;Brazil;;Brunei Darussalam;;Bulgaria;;Burkina Faso;;Burundi;;Cambodia;;Cameroon;;Canada;;Canary Is.;;Cape Verde;;Cayman Is.;;Central African Rep.;;Chad;;Channel Islands;;Chile;;China;;Christmas Is.;;Cocos Is.;;Colombia;;Comoros;;Congo, D.R. Of;;Congo;;Cook Is.;;Costa Rica;;Croatia;;Cuba;;Cyprus;;Czech Republic;;Denmark;;Djibouti;;Dominica;;Dominican Republic;;Ecuador;;Egypt;;El Salvador;;Equatorial Guinea;;Eritrea;;Estonia;;Ethiopia;;Falkland Is.;;Faroe Is.;;Fiji;;Finland;;France;;French Guiana;;French Polynesia;;French Territories;;Gabon;;Gambia;;Georgia;;Germany;;Ghana;;Gibraltar;;Greece;;Greenland;;Grenada;;Guadeloupe;;Guam;;Guatemala;;Guernsey;;Guinea-bissau;;Guinea;;Guyana;;Haiti;;Heard, Mcdonald Is.;;Honduras;;Hong Kong;;Hungary;;Iceland;;India;;Indonesia;;Iran;;Iraq;;Ireland;;Israel;;Italy;;Ivory Coast;;Jamaica;;Japan;;Jersey;;Jordan;;Kazakhstan;;Kenya;;Kiribati;;Korea, D.P.R Of;;Korea, Rep. Of;;Kuwait;;Kyrgyzstan;;Lao Peoples D.R.;;Latvia;;Lebanon;;Lesotho;;Liberia;;Libyan Arab Jamahiriya;;Liechtenstein;;Lithuania;;Luxembourg;;Macao;;Macedonia, F.Y.R Of;;Madagascar;;Malawi;;Malaysia;;Maldives;;Mali;;Malta;;Mariana Islands;;Marshall Islands;;Martinique;;Mauritania;;Mauritius;;Mayotte;;Mexico;;Micronesia;;Moldova;;Monaco;;Mongolia;;Montserrat;;Morocco;;Mozambique;;Myanmar;;Namibia;;Nauru;;Nepal;;Netherlands Antilles;;Netherlands;;New Caledonia;;New Zealand;;Nicaragua;;Niger;;Nigeria;;Niue;;Norfolk Island;;Norway;;Oman;;Pakistan;;Palau;;Palestinian Terr.;;Panama;;Papua New Guinea;;Paraguay;;Peru;;Philippines;;Pitcairn;;Poland;;Portugal;;Puerto Rico;;Qatar;;Reunion;;Romania;;Russian Federation;;Rwanda;;Samoa;;San Marino;;Sao Tome, Principe;;Saudi Arabia;;Senegal;;Seychelles;;Sierra Leone;;Singapore;;Slovakia;;Slovenia;;Solomon Is.;;Somalia;;South Africa;;South Georgia;;South Sandwich Is.;;Spain;;Sri Lanka;;St. Helena;;St. Kitts, Nevis;;St. Lucia;;St. Pierre, Miquelon;;St. Vincent, Grenadines;;Sudan;;Suriname;;Svalbard, Jan Mayen;;Swaziland;;Sweden;;Switzerland;;Syrian Arab Republic;;Taiwan;;Tajikistan;;Tanzania;;Thailand;;Timor-leste;;Togo;;Tokelau;;Tonga;;Trinidad, Tobago;;Tunisia;;Turkey;;Turkmenistan;;Turks, Caicoss;;Tuvalu;;Uganda;;Ukraine;;United Arab Emirates;;United Kingdom;;United States;;Uruguay;;Uzbekistan;;Vanuatu;;Vatican City;;Venezuela;;Viet Nam;;Virgin Is. British;;Virgin Is. U.S.;;Wallis, Futuna;;Western Sahara;;Yemen;;Yugoslavia;;Zambia;;Zimbabwe")));
$combo_country_operations->ListData = $combo_country_operations->ListItem;
}
$combo_country_operations->SelectName = 'country_operations';
// combobox: company_type
$combo_company_type = new Combo();
$combo_company_type->ListType = 0;
$combo_company_type->MultipleSeparator = ', ';
$combo_company_type->ListBoxHeight = 10;
$combo_company_type->RadiosPerLine = 1;
if (is_file(dirname(__FILE__) . '/hooks/companies.company_type.csv')) {
$company_type_data = addslashes(implode('', @file(dirname(__FILE__) . '/hooks/companies.company_type.csv')));
$combo_company_type->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions($company_type_data)));
$combo_company_type->ListData = $combo_company_type->ListItem;
} else {
$combo_company_type->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions("501(c);;AG;;BV;;CIC;;Company limited by guarantee;;Cooperative;;GmbH;;Inc;;IPS;;L3C;;LLP;;LP;;Ltd;;Ltda;;Non-incorporated partnership;;Not stated;;NV;;PLC;;Private company limited by shares;;Royal Charter;;SA;;SARL;;Societas Europaea;;Sole trader;;Subsidiary;;Unincorporated;;Unlimited")));
$combo_company_type->ListData = $combo_company_type->ListItem;
}
$combo_company_type->SelectName = 'company_type';
// combobox: sic_code
$combo_sic_code = new DataCombo();
// combobox: created
$combo_created = new DateCombo();
$combo_created->DateFormat = "dmy";
$combo_created->MinYear = 1900;
$combo_created->MaxYear = 2100;
$combo_created->DefaultDate = parseMySQLDate('<%%creationDate%%>', '<%%creationDate%%>');
$combo_created->MonthNames = $Translation['month names'];
$combo_created->NamePrefix = 'created';
if ($selected_id) {
// mm: check member permissions
if (!$arrPerm[2]) {
return "";
}
// mm: who is the owner?
//.........这里部分代码省略.........