//新增分类 $cateId = encode($cateId); $rsexits = getFieldValue($DBPrefix . "categories", "name='" . $cateId . "' and parent='0'", "id"); if ($rsexits != "") { $cateId = $rsexits; } else { $sql = "INSERT INTO " . $DBPrefix . "categories(parent,name,orderNo,cateTitle,outLinkUrl,cateCount,isHidden,cateIcons) VALUES ('0','" . $cateId . "','0','" . $cateId . "','','0','0','1')"; $DMC->query($sql); $cateId = $DMC->insertId(); } } //$logContent=encode($logContent); $logTitle = encode($logTitle); $postTime = $pubTimeType == "now" ? time() : str_format_time($pubTime); //已存在的Tags $exist_tags = tag_list("A"); $logs_tags = array(); $oldlogs_tags = array(); if ($tags != "" || $oldTags != "") { $tags_array = explode(';', $tags); $tags_array_all = array_unique($tags_array); $tags = ""; foreach ($tags_array_all as $value) { if ($value != "") { $tags .= $tags == "" ? encode(stripslashes($value)) : ";" . encode(stripslashes($value)); $logs_tags[] = encode(stripslashes($value)); } } //处理旧标签 $oldTags_array = explode(';', $oldTags); $oldTags_array_all = array_unique($oldTags_array);
</a> <?php } else { ?> anônimo <?php } ?> em <?php echo format_date($snippet->getCreatedAt(), 'd/M/y'); ?> </p> <div id="snippets"> <p><strong>Código:</strong></p> <br/> <?php echo $code; ?> <br/> <?php echo tag_list($snippet->getTags(), '@snippet_by_tag?tag='); ?> </div> <p id="voltar"><a href="<?php echo url_for('@homepage'); ?> ">← Voltar</a></p>
function render_table($format, $sources, $data, $options) { // Parameters: // $format - string, e.g. "html" // $data - an Array of Arrays - one for header, one for data rows. // $options - summable - an Array of column header names which // are to be summed (across all rows i.e. vertically). // linkcodes - boolean if (!isset($data)) { return; } if (count($data) > 0) { $headers = $data[0]; // First object echo '<table width="100%">'; echo ' ' . tag('thead', tr(tag_list("th", $headers))) . PHP_EOL; echo PHP_EOL; echo ' <tbody>' . PHP_EOL; $rows = $data[1]; // Second object //for($i = 1, $size = count($data); $i < $size; ++$i) { // $row = $data[$i]; foreach ($rows as $row) { $selected = array(); foreach ($headers as $col) { if (array_key_exists($col, $row)) { if ($col == 'source') { $selected[$col] = $sources['labels'][$row[$col]]; } else { $selected[$col] = $row[$col]; } } else { $selected[$col] = "??"; // HACK as schema changed "source" to "src" if ($col == 'source') { $selected[$col] = $sources['labels'][$row['src']]; } } } if (array_key_exists("networkCode", $row) && array_key_exists("linkcodes", $options) && $options["linkcodes"]) { $code = $selected["networkCode"]; $hcode = str_replace("/", "_", $code); $selected["networkCode"] = tag("a", $code, array('href' => "reqlognetwork.php?code={$hcode}")); } echo ' ' . tr(tag_list("td", $selected)) . PHP_EOL; } if (array_key_exists("summable", $options)) { $summable_cols = $options["summable"]; // var_dump($summable_cols); $col_sums = array(); $col_totals = sum_cols($data, $summable_cols); foreach ($headers as $col) { if (array_key_exists($col, $summable_cols)) { $col_total = $col_totals[$col]; $col_sums[] = tag('span', $col_total, array("class" => "col_total")); } else { $col_sums[] = " "; } } $col_sums[0] = "Column sums"; echo ' ' . tr(tag_list("td", $col_sums)) . PHP_EOL; } echo ' <tr><td>Rows: ' . count($rows) . '</td></tr>' . PHP_EOL; echo ' </tbody>' . PHP_EOL; echo '</table>'; } else { var_dump($data); } }
?> </select> </td> </tr> <tr> <td><?php if (in_array('ccVideo', $arrPluginName)) { do_action('f2_ccVideo'); } else { echo " "; } ?> </td> <td colspan="3" style="padding-bottom:4px;padding-top:4px;"> <?php echo "<b>{$strSelTags}</b> " . tag_list("S"); ?> </td> </tr> <?php include_once $editorpath; //装载编辑器 ?> <?php if ($settingInfo['autoSave'] == "1") { ?> <tr> <td colspan="4"> <span id="timemsg"><?php echo $strAutoSaveDisabled; ?>
?> "> <h2><?php the_title(); ?> </h2> <div class="entry"> <?php the_content(__('Read the rest of this post', 'nutcrackr') . ' »'); ?> <?php wp_link_pages(array('before' => '<p><strong>' . __('Pages', 'nutcrackr') . ':</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?> </div> <?php tag_list(); ?> <?php get_post_footer(); ?> </div> <div class="pagination clearfix"> <div class="prev"><?php previous_post_link('%link', '← %title'); ?> </div> <div class="next"><?php next_post_link('%link', '%title →'); ?> </div> </div>
function tag_list_cells($label, $name, $height, $type, $mult = false, $all = false, $spec_opt = false) { $controlAsString = tag_list($name, $height, $type, $mult, $all, $spec_opt); View::get()->addControl(View::controlFromRenderedString(View::CONTROL_ARRAY, $label, $controlAsString)); }