本文整理汇总了PHP中getTerms函数的典型用法代码示例。如果您正苦于以下问题:PHP getTerms函数的具体用法?PHP getTerms怎么用?PHP getTerms使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getTerms函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: __construct
function __construct()
{
$this->rtStructs = getAllRectypeStructures(true);
$this->dtStructs = getAllDetailTypeStructures(true);
$this->dtTerms = getTerms(true);
$this->loaded_recs = array();
}
开发者ID:HeuristNetwork,项目名称:heurist,代码行数:7,代码来源:reportRecord.php
示例2: menuData
function menuData($pos, $parentID = '0')
{
$CI =& get_instance();
$menu = getTerms('menu_' . $pos . "_" . getThemeActive(), $parentID, 'order_term ASC');
if (!empty($menu)) {
return $menu;
} else {
return null;
}
}
开发者ID:urangawak,项目名称:minangcms,代码行数:10,代码来源:html_helper.php
示例3: processRecords
function processRecords($docs)
{
global $fields;
$N = $docs->response->numFound;
foreach ($docs->response->docs as $doc) {
// echo $doc->id, "\n";
foreach ($fields as $field) {
if (isset($doc->{$field})) {
foreach ($doc->{$field} as $value) {
$terms = getTerms($field, $value);
$total = getWeights($field, $terms, $N);
// printf("\t%s: %s ==> %s\n", $field, $value, $total);
printf("%s ==> %s\n", (int) ($total * 100), $value);
}
}
}
}
}
开发者ID:pkiraly,项目名称:europeana-qa-solr,代码行数:18,代码来源:analyzer.php
示例4: upload_termsfile
function upload_termsfile($parent_id, $domain, $has_codes, $has_descr)
{
if (!@$_REQUEST['uploading']) {
return null;
}
if (!$_FILES['import_file']['size']) {
return array('error' => 'Error occurred during import - file had zero size');
}
$filename = $_FILES['import_file']['tmp_name'];
$parsed = array();
$row = 0;
if (($handle = fopen($filename, "r")) !== FALSE) {
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
$num = count($data);
if ($num > 0) {
if ($has_codes) {
$code = substr(trim($data[0]), 0, 99);
$ind = 1;
} else {
$code = '';
$ind = 0;
}
if ($num > $ind) {
$label = substr(trim($data[$ind]), 0, 399);
$len = strlen($label);
if ($len > 0 && $len < 400) {
$desc = "";
if ($has_descr) {
$ind++;
for ($c = $ind; $c < $num; $c++) {
if ($c > 1) {
$desc = $desc . ",";
}
$desc = $desc . $data[$c];
}
}
array_push($parsed, array($code, $label, substr($desc, 0, 999), $domain, $parent_id, 1));
$row++;
}
}
}
}
}
if ($handle) {
fclose($handle);
}
if ($row == 0) {
return array('error' => 'No one appropriate line found');
}
$db = mysqli_connection_overwrite(DATABASE);
//artem's
$colNames = array('trm_Code', 'trm_Label', 'trm_Description', 'trm_Domain', 'trm_ParentTermID', 'trm_AddedByImport');
$rv['parent'] = $parent_id;
$rv['result'] = array();
//result
foreach ($parsed as $ind => $dt) {
$res = updateTerms($colNames, "1-1", $dt, $db);
array_push($rv['result'], $res);
}
$rv['terms'] = getTerms();
$db->close();
return $rv;
}
开发者ID:beoutsports,项目名称:heurist-v3-1,代码行数:63,代码来源:editTermsImport.php
示例5: updateTitleMask
$res = updateTitleMask($rectypes_correspondence[$rtyID], $mask);
if (!is_numeric($res)) {
error_exit($res);
}
}
}
$mysqli->commit();
$mysqli->close();
// ------------------------------------------------------------------------------------------------
// Confirmation of import results
if ($outputFormat == "json") {
header("Content-type: text/javascript");
} else {
$trg_rectypes = getAllRectypeStructures();
$trg_fieldtypes = getAllDetailTypeStructures();
$trg_terms = getTerms();
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="../../../common/css/global.css">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body class="popup" title="Annotated template import">
<h4>Record type and associated structures imported</h4>
<hr />
开发者ID:HeuristNetwork,项目名称:heurist,代码行数:30,代码来源:importRectype.php
示例6: mysqli_connection_overwrite
$return_res = "";
if (@$_REQUEST['domain'] == null) {
echo "Terms domain is not defined";
} else {
if ($parent_id == null) {
echo "Parent vocabulary is not defined";
} else {
if (@$_REQUEST['process'] == "action") {
if (@$_REQUEST['name'] == null || $_REQUEST['name'] == "") {
echo "<div style='color:red'>Display name is mandatory!</div>";
} else {
$db = mysqli_connection_overwrite(DATABASE);
//artem's
$res = updateTerms(array('trm_Label', 'trm_Description', 'trm_Domain', 'trm_ParentTermID', 'trm_Status', 'trm_Code'), $parent_id . "-1", array($_REQUEST['name'], $_REQUEST['description'], $_REQUEST['domain'], $parent_id == 0 ? null : $parent_id, "open", $_REQUEST['code']), null);
if (is_numeric($res)) {
echo "<script>top.HEURIST.terms = \n" . json_format(getTerms(), true) . ";\n</script>";
echo "<div style='color:green'>New term has been added successfully</div>";
$return_res = $parent_id == 0 ? $res : "ok";
} else {
echo "<div style='color:red'>" . $res . "</div>";
//error
}
}
}
}
}
?>
<script type="text/javascript">
var return_res = "<?php
echo $return_res;
开发者ID:beoutsports,项目名称:heurist-v3-1,代码行数:31,代码来源:editTermForm.php
示例7: implode
print "<br />" . implode("<br />", $mapping_rt_errors2) . '</p>';
}
if (count($mapping_dt_errors) > 0) {
print "<p style='color:red'><br />Issues with base field (detail) types:<br />" . implode("<br />", $mapping_dt_errors) . '</p>';
}
print "<p style='color:red'>Please import them from the Heurist_Reference_Set database (# 3) using Database > Structure > From Databases</p>";
print "</div>";
}
}
}
}
} else {
if ($step == '2') {
//second step - sync
$alldettypes = getAllDetailTypeStructures();
$allterms = getTerms();
$fi_dettype = $alldettypes['typedefs']['fieldNamesToIndex']['dty_Type'];
$fi_constraint = $alldettypes['typedefs']['fieldNamesToIndex']['dty_PtrTargetRectypeIDs'];
$fi_trmlabel = $allterms['fieldNamesToIndex']['trm_Label'];
$report_log = "";
$unresolved_pointers = array();
// 1) start loop: fetch items by 100
$cnt_updated = 0;
$cnt_added = 0;
$cnt_ignored = 0;
$arr_ignored = array();
$start = 0;
$fetch = min($_REQUEST['cnt'], 100);
$totalitems = $_REQUEST['cnt'];
$new_recid = 0;
$isFailure = false;
开发者ID:HeuristNetwork,项目名称:heurist,代码行数:31,代码来源:syncZotero.php
示例8: htmlspecialchars
<meta property="og:image" content="<?php
echo $HTTPROOTADDRESS;
?>
img/csh_og.png">
<?php
}
?>
</head>
<body ng-init="defaultTerm = '<?php
echo $CURRENT_QUARTER;
?>
'; stateVersion = <?php
echo $JSSTATE_VERSION;
?>
; termList=<?php
echo htmlspecialchars(json_encode(getTerms()));
?>
; globalUI = {layoutClass:'default'};" ng-class="globalUI.layoutClass">
<div id="superContainer" ng-controller="AppController">
<header class="main navbar navbar-fixed-top navbar-default ng-scope">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle btn btn-default" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" ui-sref="index">Schedule<strong>Maker</strong></a>
</div>
<div class="collapse navbar-collapse navbar-right navbar-ex1-collapse" nav-close-on-mobile>
开发者ID:mirshko,项目名称:schedulemaker,代码行数:31,代码来源:index.php
示例9: createTermsOptions
function createTermsOptions($config, $type)
{
global $sourcedbname, $db_prefix, $dbPrefix, $is_h2;
$sourcedb = $db_prefix . $sourcedbname;
$entnames = getTerms();
//in current database
$entnames = $entnames['termsByDomainLookup'][$type];
foreach ($entnames as $id => $name) {
$entnames[$id] = $name[0];
}
$seloptions = createOptions("ot", $entnames);
print "<h3>Term mappings ({$type}" . "s)" . "</h3>[Term code] <b>{$sourcedb}</b> ==> <b>{$dbPrefix}" . HEURIST_DBNAME . "</b><p>";
// . "<p>";
// Get the term mapping, by default assume that the code is unchanged so select the equivalent term if available
if ($is_h2) {
$query1 = "SELECT DISTINCT `rdl_id`,`rdl_id`,`rd_val` FROM `{$sourcedb}`.`rec_details`,`{$sourcedb}`.`rec_detail_lookups` " . "where (`rd_type`=`rdl_rdt_id`) AND (`rdl_value`=`rd_val`) AND (`rdl_related_rdl_id` is " . ($type != 'enum' ? "not" : "") . " null)";
} else {
if ($type != 'enum') {
$type = 'relationtype';
}
$query1 = "SELECT DISTINCT `dtl_Value`,`trm_ID`,`trm_Label` FROM `{$sourcedb}`.`recDetails`,`{$sourcedb}`.`defTerms` " . "where (`dtl_Value`=`trm_ID`) AND (`dtl_DetailTypeID` in (select `dty_ID` from `{$sourcedb}`.`defDetailTypes` " . "where (`dty_Type`='{$type}') ))";
}
$res1 = mysql_query($query1);
print "<table>";
while ($row1 = mysql_fetch_array($res1)) {
$tt = $row1[0];
//0=trm_ID
$selopts = $seloptions;
//find the closest name
$selectedId = getPresetId($config, "cbt" . $tt);
if (!$selectedId) {
//find the closest name
$selectedId = findClosestName($row1[2], $entnames);
//trm_Label
}
if ($selectedId) {
$repl = "value='" . $selectedId . "'";
$selopts = str_replace($repl, $repl . " selected='selected' ", $selopts);
}
print "<tr><td>[ {$tt} ] " . $row1[2] . " </td>" . "<td>==> <select id='cbt{$tt}' name='cbt{$tt}' class='terms'><option id='ot0' value='0'></option>" . $selopts . "</select></td></tr>\n";
}
// loop through terms
print "</table>";
}
开发者ID:HeuristNetwork,项目名称:heurist,代码行数:44,代码来源:compareStructure.php
示例10: dirname
* See the License for the specific language governing permissions and limitations under the License.
*/
require_once dirname(__FILE__) . '/../../common/connect/applyCredentials.php';
require_once dirname(__FILE__) . '/../../common/php/getRecordInfoLibrary.php';
// Although the relationships are part of record strucutre, this also outputs the actual counts, hence login
if (!is_logged_in()) {
header("HTTP/1.1 401 Unauthorized");
exit;
}
// We are going to represent JSON. Must be on top.
header("Content-Type: application/json");
// Code below is to grab data; copied from listRectypeRelations.php
// and removed unneccessary parts to just generate XML for entities and relationships
mysql_connection_select(DATABASE);
$rtStructs = getAllRectypeStructures(true);
$rtTerms = getTerms(true);
$rtTerms = $rtTerms['termsByDomainLookup']['relation'];
$image_base_url = HEURIST_SERVER_URL . "/HEURIST/HEURIST_FILESTORE/" . HEURIST_DBNAME . "/rectype-icons/";
$idx_dt_type = $rtStructs['typedefs']['dtFieldNamesToIndex']['dty_Type'];
$idx_dt_pointers = $rtStructs['typedefs']['dtFieldNamesToIndex']['rst_PtrFilteredIDs'];
$idx_dt_name = $rtStructs['typedefs']['dtFieldNamesToIndex']['rst_DisplayName'];
$idx_dt_req = $rtStructs['typedefs']['dtFieldNamesToIndex']['rst_RequirementType'];
$idx_dt_max = $rtStructs['typedefs']['dtFieldNamesToIndex']['rst_MaxValues'];
$resrt = array();
foreach ($rtStructs['typedefs'] as $rt_id => $rt) {
if (!is_numeric($rt_id)) {
continue;
}
// ??? what does this do ???
$details = array();
$rt_cnt = 0;
开发者ID:HeuristNetwork,项目名称:heurist,代码行数:31,代码来源:getRectypeRelationsAsJSON_NOT-USED.php
示例11: getTag
function getTag($order = "", $kecuali = '')
{
return getTerms("tag", '0', $order, $kecuali);
}
开发者ID:urangawak,项目名称:minangcms,代码行数:4,代码来源:cms_helper.php
示例12: define
} else {
$is_direct_call = false;
}
if (!defined('SAVE_URI')) {
define("SAVE_URI", "disabled");
}
// using ob_gzhandler makes this stuff up on IE6-
//ini_set("zlib.output_compression_level", 5);
//ob_start('ob_gzhandler');
require_once dirname(__FILE__) . "/../connect/applyCredentials.php";
require_once dirname(__FILE__) . "/getRecordInfoLibrary.php";
mysql_connection_select(DATABASE);
if ($is_direct_call) {
ob_start();
header("Content-type: text/javascript");
}
$rv = array();
if (@$_REQUEST['action'] == 'usageCount') {
$rv = getRecTypeUsageCount();
} else {
$rv['rectypes'] = getAllRectypeStructures(false);
$rv['detailTypes'] = getAllDetailTypeStructures(false);
$rv['terms'] = getTerms(false);
$rv['icon_url'] = HEURIST_ICON_URL;
//HEURIST_SERVER_URL.
}
print json_encode($rv);
//print json_format($rv);
if ($is_direct_call) {
ob_end_flush();
}
开发者ID:HeuristNetwork,项目名称:heurist,代码行数:31,代码来源:reloadCommonInfo.php
示例13: json_format
print "top.HEURIST.database.sessionPrefix = " . json_format(HEURIST_SESSION_DB_PREFIX) . ";\n";
print "top.HEURIST.database.version = " . json_format(HEURIST_DBVERSION) . ";\n";
print "if (!top.HEURIST.baseURL_V3) top.HEURIST.baseURL_V3 = " . json_format(HEURIST_BASE_URL) . ";\n";
print "if (!top.HEURIST.baseURL_V4) top.HEURIST.baseURL_V4 = " . json_format(HEURIST_BASE_URL) . ";\n";
print "if (!top.HEURIST.iconDir) top.HEURIST.iconDir = " . json_format(HEURIST_ICON_DIR) . ";\n";
print "if (!top.HEURIST.iconBaseURL) top.HEURIST.iconBaseURL = top.HEURIST.baseURL_V4+ 'hserver/dbaccess/rt_icon.php?db='+top.HEURIST.database.name+'&id=';\n";
//.json_format(HEURIST_ICON_URL) . ";\n";
//print "alert(top.HEURIST.iconBaseURL);";
// $cache=true - use cache
//$cache = (!array_keys(@$_REQUEST, 'cache') || @$_REQUEST['cache']=="1");
/* rectypes are an array of names sorted alphabetically, and lists of
primary (bibliographic) and other rectypes, also sorted alphbetically */
print "top.HEURIST.rectypes = " . json_format(getAllRectypeStructures(true)) . ";\n";
/* detailTypes */
print "top.HEURIST.detailTypes = " . json_format(getAllDetailTypeStructures(true)) . ";\n\n";
print "\ntop.HEURIST.terms = \n" . json_format(getTerms(true), true) . ";\n";
print "\ntop.HEURIST.transforms = \n" . json_format(getTransformsByOwnerGroup(), true) . ";\n";
print "\ntop.HEURIST.tools = \n" . json_format(getToolsByTransform(), true) . ";\n";
/*print "\ntop.HEURIST.terms.termsByDomainLookup = \n" . json_format(getTerms(),true) . ";\n";
print "\ntop.HEURIST.terms.treesByDomain = { 'relation' : " . json_format(getTermTree("reltype","prefix"),true).",\n
'enum' : " . json_format(getTermTree("enum","prefix"),true)." };\n";
*/
?>
top.HEURIST.ratings = {"0": "not rated",
"1": "*",
"2": "**",
"3": "***",
"4": "****",
"5": "*****"
开发者ID:HeuristNetwork,项目名称:heurist,代码行数:31,代码来源:loadCommonInfo.php
示例14: search_events
function search_events($name, $location, $date, $desc, $postcode, $maxdist, $id)
{
//Connect to the database
$con = connect();
//Import geoIP to find distance to events
require_once "geoIP.php";
//Allows for easy SQL generation
$sql = "SELECT * FROM Events WHERE 1=1 ";
//For each argument, append to the SQL if it is set (black magic, but it works)
// --HACKY-- //
if (!no_val($name)) {
$sql .= " AND `name` LIKE '%" . mysqli_real_escape_string($con, $name) . "%'";
}
if (!no_val($location)) {
$sql .= " AND `location`LIKE '%" . mysqli_real_escape_string($con, $location) . "%'";
}
if (!no_val($date)) {
$sDate = stringToDate($date);
$sql .= " AND `startDate` <=" . $sDate[0] . " AND `endDate` >=" . $sDate[1];
}
if (!no_val($desc)) {
$sql .= " AND (`description` LIKE '" . getTerms($desc) . ")";
}
if (!no_val($postcode)) {
$sql .= " AND `postcode`LIKE '%" . mysqli_real_escape_string($con, $postcode) . "%'";
}
if (!no_val($id)) {
$sql .= " AND `createdBy` = " . $id;
}
//prepare the statement to be run
//If this fails, either you have made a mistake editing this glorious code
//Or there's malicious input
if (!($stmt = $con->prepare($sql))) {
echo "SQL incorrect or injection attempt.";
die;
}
//Run the query. Stop all PHP if we can't for any reason
if (!$stmt->execute()) {
echo "Query Failed";
die;
}
//Retrieve the results
$result = $stmt->get_result();
$results = array();
//Postcode regular expression
//Provided by the government, so should work 100% of the time
$regex = '#^(GIR ?0AA|[A-PR-UWYZ]([0-9]{1,2}|([A-HK-Y][0-9]';
$regex .= '([0-9ABEHMNPRV-Y])?)|[0-9][A-HJKPS-UW]) ?[0-9]';
$regex .= '[ABD-HJLNP-UW-Z]{2})$#';
//Get thbe user's location for distance calculations
$postcode1 = urlencode(getLocation()['zipCode']);
//Prepare the google maps API
$url = "https://maps.googleapis.com/maps/api/distancematrix/json?origins=";
$url .= urlencode($postcode1) . "&destinations=";
//Go through all results from the query
$distances = array();
$num = 0;
while ($row = $result->fetch_assoc()) {
$url .= urlencode("|" . $row['location']);
$num += 1;
if (strlen($url) >= 1500) {
$url .= "&units=imperial";
$google = curl_init($url);
curl_setopt($google, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($google);
curl_close($google);
if ($data) {
$data = json_decode($data);
if ($data->status == "OK") {
foreach ($data->rows[0]->elements as $dist) {
if ($dist->status == "OK") {
array_push($distances, $dist->distance->text);
} else {
array_push($distances, "---");
}
}
}
if (@sizeof($data->rows[0]->elements < $num)) {
for ($i = 0; $i < $num; $i++) {
array_push($distances, "---");
}
}
$url = "https://maps.googleapis.com/maps/api/distancematrix/json?origins=";
$url .= urlencode($postcode1) . "&destinations=";
} else {
$url = "https://maps.googleapis.com/maps/api/distancematrix/json?origins=";
$url .= urlencode($postcode1) . "&destinations=";
for ($i = 0; $i < $num; $i++) {
array_push($distances, "---");
}
}
$num = 0;
}
//Placeholder for distance values
array_push($row, "---");
//Add row to our results
array_push($results, $row);
}
//Set the units to miles.
//There's no real reason, most people just use miles
//.........这里部分代码省略.........
开发者ID:anca1243,项目名称:eventify,代码行数:101,代码来源:database.php
示例15: die
print "<script>showSelectedRecTypes('".$rt_toexport."')</script>";
}*/
if ($rt_toexport && count($rt_toexport) > 0 && !$invalid) {
$folder = HEURIST_FILESTORE_DIR . "faims/new/" . $projname;
//create export folder
if (!file_exists($folder)) {
if (!mkdir($folder, 0777, true)) {
die('Failed to create folder for ' . $folder . ' - check that file permissions are correctly set');
}
} else {
//clear folder
delFolderTree($folder, false);
}
//load definitions (USE CACHE)
$dtStructs = getAllDetailTypeStructures(false);
$dtTerms = getTerms(false);
$ind_parentid = $dtTerms['fieldNamesToIndex']['trm_ParentTermID'];
$ind_label = $dtTerms['fieldNamesToIndex']['trm_Label'];
$ind_descr = $dtTerms['fieldNamesToIndex']['trm_Description'];
// $unsupported was original specification, but this will stuff up if new types are added
$supported = array('freetext', 'blocktext', 'integer', 'date', 'year', 'boolean', 'enum', 'float', 'file', 'resource');
//$unsupported = array('relmarker','relationtype','separator','calculated','fieldsetmarker','urlinclude','geo');
// Note: Geos are supported, but FAIMS uses a different methodology for recording them, that is they are an implicit part of every record
$content_a16n = null;
//file_put_contents($folder."/project.settings", $projname." and basic information 3");
file_put_contents($folder . "/data_schema.xml", generateSchema($projname, $rt_toexport, $rt_geoenabled));
file_put_contents($folder . "/ui_schema.xml", generate_UI_Schema($projname, $rt_toexport, $rt_geoenabled));
file_put_contents($folder . "/arch16N.properties", arrToProps());
file_put_contents($folder . "/ui_logic.bsh", generate_Logic($projname, $rt_toexport, $rt_toexport_toplevel, $rt_geoenabled));
file_put_contents($folder . "/style.css", getStyling());
//copy("ui_logic.bsh", $folder."/ui_logic.bsh"); //this is a Java beanshell file which provides the operational logic for the tablet interface
开发者ID:HeuristNetwork,项目名称:heurist,代码行数:31,代码来源:exportFAIMS.php
示例16: getTerms
<div class="panel-group" id="accordion">
<?php
$this->load->library('m_net');
$data = getTerms("sidebar", $termid, "order_term ASC");
if (!empty($data)) {
foreach ($data as $row) {
$wi = $row->term_id;
$prefix = menuInfoJSON($wi, 'prefix');
$jsondata = dbField('terms', 'term_id', $wi, 'term_data');
$sb = $this->m_database->fetchData('terms', array('term_id' => $wi));
$param = array('data' => $jsondata, 'widgetdata' => $sb, 'parentid' => $termid);
$j = $this->m_net->curlNet("get", base_url() . 'service/widget/' . $prefix . '/configwidget', $param);
echo $j;
}
} else {
echo "Tidak ada widget";
}
?>
</div>
<input type="hidden" id="widgetpos" value="<?php
echo $pos;
?>
"/>
<input type="hidden" id="widgetid" value="<?php
echo $termid;
?>
"/>
开发者ID:urangawak,项目名称:minangcms,代码行数:27,代码来源:widgetitemloader.php
示例17: strtolower
$val = strtolower(str_replace($prefix, "", $val));
$label = strtoupper(str_replace($prefix, "", $val));
if (!is_dir(MODPATH . 'service/controllers/widget/' . $val)) {
$json = json_encode(array('service' => $val, 'description' => 'Menampilkan ' . $val));
insertTerms($val . "_widget", $val . "-widget", $val . "-widget", 'Menampilkan ' . $val, "0", $json);
?>
<div class="col-md-4 col-sm-6">
<div class="panel panel-default">
<div class="panel-heading"><?php
echo $label;
?>
</div>
<div class="panel-body">
<?php
$d = getTerms($val . "_widget");
foreach ($d as $r) {
}
$termid = $r->term_id;
$data = menuInfoJSON($termid, "description");
echo $data;
?>
</div>
<div class="panel-footer">
<a href="javascript:;" onclick="addwidget('<?php
echo $val;
?>
')">Add Widget</a>
</div>
</div>
</div>
开发者ID:urangawak,项目名称:minangcms,代码行数:31,代码来源:widgettool.php
示例18: mc_menu
function mc_menu($theme, $position = 'top', $parentID = '0')
{
$CI =& get_instance();
$menu = getTerms('menu_' . $position . "_" . $theme, $parentID, 'order_term ASC');
if (!empty($menu)) {
return $menu;
} else {
return null;
}
}
开发者ID:urangawak,项目名称:minangcms,代码行数:10,代码来源:mc_helper.php
示例19: define
// URI of the containing page
if (array_key_exists('alt', $_REQUEST)) {
define('use_alt_db', 1);
}
require_once dirname(__FILE__) . '/../../common/connect/applyCredentials.php';
require_once dirname(__FILE__) . '/../../common/php/dbMySqlWrappers.php';
require_once dirname(__FILE__) . '/../../common/php/Temporal.php';
mysql_connection_select(DATABASE);
require_once dirname(__FILE__) . '/../../common/php/getRecordInfoLibrary.php';
require_once dirname(__FILE__) . '/../../records/woot/woot.php';
require_once dirname(__FILE__) . '/../../records/files/uploadFile.php';
$noclutter = array_key_exists('noclutter', $_REQUEST);
$is_map_popup = array_key_exists('mapPopup', $_REQUEST) && $_REQUEST['mapPopup'] == 1;
$is_reloadPopup = array_key_exists('reloadPopup', $_REQUEST) && $_REQUEST['reloadPopup'] == 1;
$rectypesStructure = getAllRectypeStructures();
$terms = getTerms();
// get a list of workgroups the user belongs to. - ARTEM - NOT USED
$ACCESSABLE_OWNER_IDS = mysql__select_array('sysUsrGrpLinks left join sysUGrps grp on grp.ugr_ID=ugl_GroupID', 'ugl_GroupID', 'ugl_UserID=' . get_user_id() . ' and grp.ugr_Type != "user" order by ugl_GroupID');
if (is_logged_in()) {
array_push($ACCESSABLE_OWNER_IDS, get_user_id());
if (!in_array(0, $ACCESSABLE_OWNER_IDS)) {
array_push($ACCESSABLE_OWNER_IDS, 0);
}
}
// if we get a record id then see if there is a personal bookmark for it.
if (@$_REQUEST['recID'] && !@$_REQUEST['bkmk_id']) {
$res = mysql_query('select * from usrBookmarks where bkm_recID = ' . intval($_REQUEST['recID']) . ' and bkm_UGrpID = ' . get_user_id());
if ($res && mysql_num_rows($res) > 0) {
$row = mysql_fetch_assoc($res);
$_REQUEST['bkmk_id'] = $row['bkm_ID'];
}
开发者ID:HeuristNetwork,项目名称:heurist,代码行数:31,代码来源:renderRecordData.php
示例20: optionGet
<?php
$themeFront = optionGet('theme_front');
$sidebar = getTerms('sidebar');
?>
<label>Pilih Widget <br/><small class="text-info">(*) Widget ini sesuai tema yang aktif</small></label>
<select name="widget" id="widget" class="form-control">
<option value="">-Posisi Widget-</option>
<?php
foreach ($sidebar as $rside) {
if (stristr($rside->name, $themeFront . "_sidebar") == TRUE) {
$ex = explode("_", $rside->name);
$termid = $rside->term_id;
?>
<option value="<?php
echo $ex[2] . ":" . $termid;
?>
"><?php
echo ucfirst($ex[2]);
?>
</option>
<?php
}
}
?>
</select>
<p> </p>
<div id="widgetloader"></div>
<script>
$(document).ready(function(){
$("#widget").change(function(){
开发者ID:urangawak,项目名称:minangcms,代码行数:31,代码来源:widgetside.php
注:本文中的getTerms函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论