本文整理汇总了PHP中lka函数的典型用法代码示例。如果您正苦于以下问题:PHP lka函数的具体用法?PHP lka怎么用?PHP lka使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了lka函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: patch_tags
function patch_tags()
{
$table["_meta"] = '
CREATE TABLE IF NOT EXISTS `' . ses('qd') . '_meta` (
`id` int(7) NOT NULL AUTO_INCREMENT,
`cat` varchar(255) collate latin1_general_ci NOT NULL,
`tag` varchar(255) collate latin1_general_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;';
/*
$table["_meta-id"]='
ALTER TABLE `'.ses('qd').'_meta`
ADD PRIMARY KEY (`id`);';*/
$table["_meta_art"] = '
CREATE TABLE IF NOT EXISTS `' . ses('qd') . '_meta_art` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`idart` int(7) NOT NULL,
`idtag` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;';
/*
$table["_meta_art-id"]='
ALTER TABLE `'.ses('qd').'_meta_art`
ADD PRIMARY KEY (`id`);';*/
foreach ($table as $k => $sql) {
$req = mysql_query($sql) or die(mysql_error());
$ret .= divc('', ses('qd') . '' . $k . ': created');
}
$ret .= lka('/plug/tagpatch/', 'Apply patch to fill the new databases (click on each links)');
return $ret;
}
示例2: plug_cubes
function plug_cubes($d)
{
req('pop');
$w = currentwidth();
$r = $_SESSION['rqt'];
$cols = 4;
$c = $cols * 3;
$n = count($r);
$nl = ceil($n / $c);
$l = $w / $c;
$cats = array_keys_r($r, 1, 'k');
$clr = cub_clr($cats);
foreach ($r as $k => $v) {
if ($v[11] > 1 && $v[3]) {
$lx = $l * ($v[11] - 1);
//$pub=minimg($v[3],"h").lka(htac($k),$v[2]);
//$pub=make_thumb_d($v[3],round($lx).'/'.round($lx));//
$pub = image('/imgc/' . $v[3], round($lx), round($lx));
$pub = lka(htac($k) . '" title="' . $v[2], $pub);
$ret .= divs(cub_sz($lx, $clr[$v[1]]), $pub);
}
}
//for($ic=0;$ic<$c;$ic++){}
//for($ib=0;$ib<$nl;$ib++){$i++;}
return $ret;
}
示例3: ummoay_build
function ummoay_build($p, $o)
{
req('art,tri,pop,spe');
reqp('msqarts');
$tmp = ummoay_template();
$r = req_arts_y($p);
$rtg = list_tags();
if ($r) {
foreach ($r as $k => $v) {
list($id, $day, $msg, $cat, $tag, $lk) = $v;
$day = clean_day_tw($day);
$msg = format_txt($msg, '', '');
$lnk = lka(urlread($id));
$pop = lj('', 'popup_trckpop___' . $id, picto('forum', 16));
$rb[$day] = array('suj' => $cat, 'day' => mkday($day, 'Y/m/d'), 'msg' => $msg, 'url' => $lk, 'open' => popart($id, 'articles') . ' ' . $pop, 'tag' => $rc = $rtg[$id]);
}
}
krsort($rb);
foreach ($rb as $k => $v) {
$rd[nms(100)] .= template_build($tmp, $v);
$rc = $v['tag'];
if ($rc) {
foreach ($rc as $kb => $vb) {
$rd[$kb] .= template_build($tmp, $v);
}
}
}
return make_tabs($rd);
}
示例4: twit_embed_url
function twit_embed_url($d)
{
$d = str_replace("\n", ' && ', $d);
$r = explode(' ', $d);
foreach ($r as $v) {
if (strncmp($v, 'http', 4) === 0) {
$ret .= lka($v, $v) . ' ';
} elseif (strncmp($v, '@', 1) === 0) {
$ret .= lka('https://twitter.com/' . strrchr_b($v, '@'), $v) . ' ';
} else {
$ret .= $v . ' ';
}
}
return str_replace(' && ', br(), $ret);
}
示例5: channel
function channel($p, $t, $d = '')
{
$ra = explode(' ', $p);
foreach ($ra as $ka => $va) {
list($kab, $vab) = split(':', $va);
$sc[$vab] = $kab;
}
if ($sc['site']) {
require_once 'plug/microxml.php';
$site = 'http://' . $sc['site'];
$t = lka($site, $sc['site'] . '/' . $sc['hub']);
$load = clkt($sc['site'] . '/msql/users/' . $sc['hub'] . '_cache');
} else {
$load = msql_read('users', $sc['hub'] . '_cache', '', 1);
}
if ($load) {
if ($sc['cat']) {
$load = channel_tri($load, $sc['cat'], 1);
}
if ($sc['parent']) {
$load = channel_tri($load, $sc['art'], 10);
}
if ($sc['art']) {
$load = channel_tri($load, $sc['art'], '');
}
if ($sc['tag']) {
$load = channel_tri($load, $sc['tag'], 5);
}
if ($sc['last']) {
$load = splice($load, $sc['last']);
}
$t = build_titl($load, !$t ? $sc['hub'] : $t, 1, $sc['hub']);
if ($d == 'articles') {
if ($site) {
$ret .= output_pages_from_cache($site, $load);
} else {
$ret .= output_pages($load, 2, '');
}
} elseif ($load) {
foreach ($load as $k => $v) {
$re[] = llk('', $site . '/' . $k, html_entity_decode($v[2]));
}
$ret = implode('', $re);
$ret = balc('ul', 'panel pubart', $ret);
}
}
return $t . $ret;
}
示例6: sugg_recall
function sugg_recall()
{
$nod = nod('suggest');
$r = msql_read('', $nod, '');
$js = 'popup_call__3_ajxf_batch*preview_';
if ($r) {
foreach ($r as $k => $v) {
$j = ajx($v[2]);
$lnk = lka($v[2], picto('url'));
if (!$v[1]) {
$ret .= br() . lj('popbt', $js . $j . '_' . $k, $v[0] . ' ' . preplink($v[2])) . ' ' . $lnk;
}
}
}
return $ret;
}
示例7: addf_inject
function addf_inject()
{
calltar();
$ra = msql_read('server', 'edition_typos', '');
if ($ra) {
$vra = array_keys_r($ra, 0, 'k');
}
$r = msql_read('', 'public_addfonts', '');
if ($r) {
$vr = array_shift($r);
}
$dir = 'fonts/';
$diru = 'users/' . $_SESSION['qb'] . '/fonts/';
if (!is_dir($diru)) {
mkdir($diru);
}
if ($r) {
foreach ($r as $k => $v) {
$font = normalize($v[0]);
if (!$vra[$font]) {
$rb = array($font, '', '', '', '');
for ($i = 1; $i < count($v); $i++) {
$f = $font . '.' . $vr[$i];
$rc[] = $dir . $f;
$ret .= addf_copy($v[$i], $dir . $f) . br();
}
//u
//msql_modif('server','edition_typos',$rb,$dfb,'push','');
//modif_vars('','public_addfonts',$k,'del');
if ($rc) {
PclTarCreate($diru . $font . '.tar.gz', $rc, '', '', '');
}
$ret .= btn('txtblc', lka($diru . $font . '.tar.gz')) . ' ' . btn('txtx', 'saved') . br();
} else {
$ret .= $font . ' already_exists' . br();
}
}
}
//if($rb)msql_modif('server','edition_typos',$rb,$dfb,'add','');
$ret .= lkc('txtbox', '/?admin=fonts&inject==', 'inject datas (admin/fonts)') . br();
return $ret;
}
示例8: msqmerge
function msqmerge($r, $d)
{
$d = strrchr_b($d, '_');
if ($r) {
foreach ($r as $k => $v) {
$dy = substr($v[1], 0, 6);
$msg = $v[2];
$msg = delconn($msg);
$msg = msqm_msg($msg);
//echo 'eee';
//$msg=miniconn($msg);
//$msg=embed_links($msg);
//$msg=format_txt($msg,'','');
$msg = correct_txt($msg, '', 'sconn');
$msg = nl2br($msg);
$ret[$v[0]] = array($d, lka($v[0], $dy), $msg, lka($v[3], picto('tw')));
}
}
return $ret;
}
示例9: icocss_build
function icocss_build($p, $o)
{
$f = 'css/_pictos.css';
$r = msql_read('system', 'edition_pictos', '', 1);
//$ret='@font-face {font-family: "philum"; src: url("/fonts/philum.eot?iefix") format("eot"), url("/fonts/philum.woff?v8.908") format("woff"), url("/fonts/philum.svg#philum") format("svg"), url("/fonts/philum.ttf") format("truetype");}';
//$ret='.philum{font-family:"philum"; height:20px; font-size:16px; display:inline-block; text-align:center;}'."\n";
foreach ($r as $k => $v) {
//if($k=='add' or $k=='msql')echo $k.'-'.$v.'-'.ord($v).'-'.dechex(ord($v)).br();
if ($k == 'msql') {
$v = '$';
}
if ($k == 'less') {
$v = "'";
}
if ($k == 'triangle') {
$v = 'å';
}
if ($k == 'round') {
$v = 'ã';
}
if ($k == 'quote') {
$v = '"';
}
if ($k == 'tree') {
$v = 'â';
}
if ($k == 'refresh') {
$v = '0';
}
if ($k == 'agenda') {
$v = '\\';
}
if ($k == 'builders') {
$v = ',';
}
$v = '\\' . str_pad(dechex(ord($v)), 4, 0, STR_PAD_LEFT);
$ret .= '.ic-' . $k . ':before{content:"' . $v . '";}' . "\n";
}
write_file($f, $ret);
return lka($f);
}
示例10: umnb_j
function umnb_j($p, $o = '', $res = '')
{
list($p, $o) = ajxp($res, $p, $o);
//base 12
$n = base_convert($p, 10, 12);
//nominations base 6
$r_c = array(0 => 'OU', 1 => 'I', 2 => 'I', 3 => 'I', 4 => 'I', 5 => 'I', 6 => 'O', 7 => 'O', 8 => 'O', 9 => 'O', 'a' => 'O', 'b' => 'O');
//chiffres
$r_u = array(0 => 'O', 1 => 'AS', 2 => 'EN', 3 => 'EDOO', 4 => 'ES', 5 => 'EGO', 6 => 'AEE', 7 => 'ANA', 8 => 'ANMA', 9 => 'ADA', 'a' => 'AS', 'b' => 'ADEN');
//décimales
$r_d = array(0 => '', 1 => 'D', 2 => 'K', 3 => '?', 4 => '?', 5 => '?');
$r = str_split($n);
//p($r);
$nb = count($r);
//nb de chiffres
$ra = array($r_c, $r_u, $r_d);
//theory
//le zéro de chaque décimale base 12 est préfixé d'un incrément de demi-décimale $r_c: I, O
$decimale12 = floor($p / 12);
if ($decimale12 == $p / 12) {
$indicatif_zero = $r_c[$decimale12];
}
//foreach($r as $k=>$v)$ren.=$umnb_pic($r[$i]).' ';
for ($i = $nb - 1; $i >= 0; $i--) {
$ren .= umnb_pic($r[$i]) . $r[$i] . br();
}
if ($nb == 1) {
$res = $r_c[$r[0]] . '-' . $r_u[$r[0]];
}
if ($nb == 2) {
$res = $r_d[$r[0]] . '' . $r_c[$r[1]] . '-' . $indicatif_zero . $r_u[$r[1]];
}
$ret = lka('/plug/umnb/' . $p, picto('link')) . ' ';
$ret .= lj('', $o . '_plug__2_umnb_umnb*j_' . ($p - 1) . '_' . $o, picto('previous')) . ' ';
$ret .= lj('', $o . '_plug__2_umnb_umnb*j_' . ($p + 1) . '_' . $o, picto('next')) . ' ';
$ret .= bal('b', $p) . ' (' . bal('b', $n) . ' en base 12, décimale ' . $decimale12 . '): ';
$ret .= bal('h3', $res);
$ret .= $ren;
return $ret;
}
示例11: upload_j
function upload_j()
{
//p($_FILES);
if (isset($_FILES['myfile']) && $_SESSION['uproot']) {
$tmp = $_FILES['myfile']['tmp_name'];
$t = $_FILES['myfile']['type'];
$s = fsize_b($_FILES['myfile']['size']);
$n = $_FILES['myfile']['name'];
$n = strtolower($n);
$f = $_SESSION['uproot'] . '/' . $n;
//if(is_uploaded_file($tmp))echo $tmp;
if (is_file($tmp)) {
echo $f;
}
//if(is_file($tmp))$d=read_file($tmp); if($d)write_file($f,$d);
if (move_uploaded_file($tmp, $f)) {
return lka($f) . ' type: ' . $t . ' ' . $s . br();
} else {
return 'error';
}
} else {
return 'nothing';
}
}
示例12: rech_internal
function rech_internal($rech)
{
$load = search_engine($rech);
$t = btn('', lka(htac('search') . $rech, $rech));
if ($load) {
return $t . m_pubart($load, "cols", 3);
}
}
示例13: draw_table
function draw_table($r, $murl, $adm = '')
{
//adm=saving
list($dr, $nd, $n) = murl_vars($murl);
foreach ($r as $k => $v) {
$ra = '';
$i++;
if (is_array($v)) {
foreach ($v as $ka => $va) {
$ra[] = msq_data(cutat($va), 1);
}
}
$css = $k == $_GET['def'] ? 'txtyl' : 'txtbox';
$jurl = ajx($murl) . '_' . ajx($k);
$edit = lka(sesm('url') . $murl . ':' . $k . gpage(), picto('editor'));
//ajx
if ($k == '_menus_' && $ra) {
foreach ($ra as $ka => $va) {
$ra[$ka] = lka(sesm('url') . $murl . '&sort=' . $ka, $ka . ':' . $va);
}
array_unshift($ra, lka(sesm('url') . $murl . '&sort=k', 'keys'));
if (auth(4)) {
array_unshift($ra, '');
}
} elseif (is_array($ra)) {
foreach ($ra as $ka => $va) {
$ra[$ka] = medit_shot_bt($va, $k, $ka, $dr, ajx($nd));
}
if (auth(4)) {
array_unshift($ra, lj($css, 'popup_editmsql___' . $jurl, $k));
}
if (auth(4)) {
array_unshift($ra, $edit);
} else {
array_unshift($ra, $k);
}
}
$datas[$k] = $ra;
}
return make_table_bypage($datas, 'popw', '');
}
示例14: cache_arts
function cache_arts()
{
$nod = $_SESSION['qb'] . '_cache';
$main = msql_read_b('', $nod, '', 1);
if ($main) {
$last = current($main);
}
$lastart = last_art($last[0]);
if (!is_array($main[$lastart]) && $lastart or get('refresh')) {
$ret['_menus_'] = array('date', 'cat', 'title', 'img', 'hub', 'tag', 'lu', 'author', 'length', 'url', 'ib', 're');
//if(!ses('dayb'))ses('dayb',calc_date(ses('nbj')));
$slct = 'id,day,frm,suj,img,nod,thm,lu,name,host,mail,ib,re';
if (ses('dayb')) {
$wh = ' and day>"' . ses('dayb') . '"';
}
$r = sq($slct, 'qda', 'where nod="' . ses('qb') . '"' . $wh . ' and substring(frm,1,1)!="_" and re>"0" order by ' . prmb(9));
if ($r) {
while ($rb = mysql_fetch_row($r)) {
$k = array_shift($rb);
$rb[3] = first_img($rb[3]);
$rtb[$k] = $rb;
if ($rtb) {
$ret += $rtb;
}
}
}
$ok = 'cache reloaded';
msql_save('', $nod, $ret);
$_SESSION['rqt'] = $rtb;
} else {
$_SESSION['rqt'] = $main;
}
return lka('/reload/' . ses('qb'), 'reload');
}
示例15: make_ban
function make_ban($here, $t)
{
$qb = ses('qb');
$htacc = subdom($qb);
$banim = 'img/ban_' . $qb . '.jpg';
if (file_exists($banim)) {
return lkc("", $htacc, img($banim));
} else {
return bal('h1', lka($htacc, $t ? $t : $_SESSION['mn'][$qb]));
}
}