• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getTag函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: likeTags

function likeTags($tag, $url = "", $pagination = false)
{
    global $c, $cT;
    $me = getTag($tag, $url);
    $next = $me->pagination->next_url;
    foreach ($me as $posts) {
        if (is_array($posts)) {
            foreach ($posts as $ta) {
                $idUser = $ta->user->id;
                if ($ta->user_has_liked != '1') {
                    print "Liked: 1, user_has_liked: " . $ta->user_has_liked . " idUser:" . $idUser . " Idphoto: " . $ta->id . "<br>";
                    //follow
                    //$followBack = follow($idUser);
                    $lke = like($ta->id);
                    break;
                    if ($lke->meta->code > 0) {
                        print "         - Retorno - OK";
                    }
                    flush();
                } else {
                    //$followBack = follow($idUser);
                    print "Liked: 0,  user_has_liked:: " . $ta->user_has_liked . " idUser:" . $idUser . " IdPhoto: " . $ta->id . "<br>";
                    flush();
                }
                flush();
            }
        }
    }
    if ($pagination && !empty($next) && $c < $cT) {
        $c++;
        print "NEW - Getting new Wave: <br>";
        likeTags($tag, $next, $pagination);
    }
}
开发者ID:augustogava,项目名称:instagram-php,代码行数:34,代码来源:index.php


示例2: testSinglePostTag

 function testSinglePostTag()
 {
     $r = singlePostTag(new folksoQuery(array(), array('folksonewtag' => 'emacs'), array()), $this->dbc, $this->fks);
     $this->assertEqual($r->status, 403, 'Unknown user should provoke a 403 on singlePostTag:' . $r->status);
     $this->fks2->startSession('marcelp-2010-001', true);
     $r2 = singlePostTag(new folksoQuery(array(), array('folksonewtag' => 'emacs'), array()), $this->dbc, $this->fks2);
     $this->assertIsA($r2, folksoResponse, 'Problem with object creation');
     $this->assertEqual($r2->status, 201, 'Tag creation returning error: ' . $r->status);
     $t = getTag(new folksoQuery(array(), array('folksotag' => 'emacs'), array()), new folksoDBconnect('localhost', 'tester_dude', 'testy', 'testostonomie'), $this->fks);
     $this->assertEqual(200, $t->status, 'New tag not created: ' . $t->status . $t->status_message);
     $h = headCheckTag(new folksoQuery(array(), array('folksotag' => 'tagone'), array()), new folksoDBconnect('localhost', 'tester_dude', 'testy', 'testostonomie'), $this->fks);
     $this->assertEqual($h->status, 200, 'headcheck says the tag is still not there');
 }
开发者ID:josf,项目名称:folkso,代码行数:13,代码来源:tag-test.php


示例3: printComment

function printComment($comment)
{
    global $config;
    $output = "";
    $tag = getTag($comment['tag']);
    $date = date_create($comment['date'], timezone_open('GMT'));
    $output .= "<li>On " . date_format($date, 'F j') . " ";
    if (empty($comment['site'])) {
        $output .= htmlspecialchars($comment['author']);
    } else {
        $output .= "<a href='" . htmlspecialchars($comment['site']) . "'>" . htmlspecialchars($comment['author']) . "</a>";
    }
    $output .= " left <a href='" . href("tag/" . $comment["tag"] . "#comment-" . $comment['id']) . "'>comment " . $comment['id'] . "</a>";
    $output .= " on <a href='" . href('tag/' . $comment['tag']) . "'>tag <var title='" . $tag['label'] . "'>" . $comment['tag'] . "</var></a>";
    $output .= "<blockquote>";
    $output .= htmlentities(substr($comment['comment'], 0, $config["comments cutoff"])) . (strlen($comment['comment']) > $config["comments cutoff"] ? '...' : '');
    $output .= "</blockquote>";
    return $output;
}
开发者ID:robertcardona,项目名称:stacks-website,代码行数:19,代码来源:recentcomments.php


示例4: getCommentsSidebar

function getCommentsSidebar($db)
{
    $comments = get_comments($db, 0, 6);
    $value = "";
    $maxAuthorLength = 15;
    $value .= "<h2><a href='" . href("recent-comments.xml") . "' class='rss'>Recent comments</a></h2>";
    $value .= "<ul>";
    foreach ($comments as $comment) {
        $date = new DateTime($comment["date"]);
        $value .= "<li>" . date_format($date, "j F Y, g:i a") . ":<br> ";
        if (strlen($comment["author"]) > $maxAuthorLength) {
            $value .= htmlentities(mb_substr($comment["author"], 0, $maxAuthorLength, "UTF-8")) . "...";
        } else {
            $value .= htmlentities($comment["author"]);
        }
        $tag = getTag($comment["tag"]);
        $section = getEnclosingSection($tag["position"]);
        $value .= " on <a title='in section " . $section["book_id"] . " " . parseAccents($section["name"]) . "' href='" . href("tag/" . $comment["tag"] . "#comment-" . $comment["id"]) . "'>tag " . $comment["tag"] . "</a>";
    }
    $value .= "</ul>";
    return $value;
}
开发者ID:robertcardona,项目名称:stacks-website,代码行数:22,代码来源:comments.php


示例5: getTag

     $sql .= ' and d_year=' . $d_year;
 }
 if (strpos($inrule, 'd')) {
     $sql .= ' and d_area=\'' . $d_area . '\'';
 }
 if (strpos($inrule, 'e')) {
     $sql .= ' and d_lang=\'' . $d_lang . '\'';
 }
 if (strpos($inrule, 'f')) {
     $sql .= ' and d_starring=\'' . $d_starring . '\'';
 }
 if (strpos($inrule, 'g')) {
     $sql .= ' and d_directed=\'' . $d_directed . '\'';
 }
 if ($MAC['collect']['vod']['tag'] == 1) {
     $d_tag = getTag($d_name, $d_content);
 }
 $row = $db->getRow($sql);
 if (!$row) {
     foreach ($array4[1] as $key => $value) {
         if ($rc) {
             $d_playfrom .= "\$\$\$";
             $d_playserver .= "\$\$\$";
             $d_playnote .= "\$\$\$";
             $d_playurl .= "\$\$\$";
         }
         $d_playfrom .= getFrom($value);
         $d_playurl .= getVUrl($array4[2][$key]);
         $d_playserver .= '0';
         $d_playnote .= '';
         $rc = true;
开发者ID:klarclm,项目名称:sgv,代码行数:31,代码来源:collect.php


示例6: mysql_query

mysql_query($q);
$tags = explode(",", $tags);
foreach ($tags as $tag) {
    if ($tag) {
        $bool = getTag($tag);
    } else {
        $bool = true;
    }
    if (!$bool) {
        addTag($tag);
    }
}
$tags_en = explode(",", $tags_en);
foreach ($tags_en as $tag) {
    if ($tag) {
        $bool = getTag($tag, 'en');
    } else {
        $bool = true;
    }
    if (!$bool) {
        addTag($tag, '', 'en');
    }
}
// bet items must not be overwritten if coins have already been betted on the game
// so we need to prevent it by checking if total_placed_coin is 0
if (!$total_placed_coins) {
    $cachefile = $basedir . '/temp/bet_items_active.php';
    $cachedata = false;
    if (file_exists($cachefile)) {
        $temp = json_decode(file_get_contents($cachefile), true);
        // remove all bet items from this game
开发者ID:msports,项目名称:online-sports-betting,代码行数:31,代码来源:editgame.php


示例7: pcRender

function pcRender($data, $modId)
{
    //var_dump($data);
    if (array_key_exists($modId, $data)) {
        $arrMod = $data[$modId];
        ksort($arrMod);
        //var_dump($arrMod);
        $ret = array();
        $from = 'pc';
        if ($modId == '_20') {
            foreach ($arrMod as $k => $v) {
                $ret[] = '<div class="banners banners1" id="baby_posid20"><a onclick="ga(\'send\', \'event\', \'link\', \'click\', \'bannersmall-No.1\');" href="' . getUrl($v) . '" babyinfo="' . getInfo($v, $from) . '"><img src="' . getImg($v) . '" width="1190" height="90"></a></div>';
            }
        } elseif ($modId == '_21') {
            foreach ($arrMod as $k => $v) {
                $ret[] = '<div class="banners banners2" id="baby_posid21"><a onclick="ga(\'send\', \'event\', \'link\', \'click\', \'bannersmall-No.2\');" href="' . getUrl($v) . '" babyinfo="' . getInfo($v, $from) . '"><img src="' . getImg($v) . '" width="1190" height="90"></a></div>';
            }
        } elseif ($modId == '_1') {
            foreach ($arrMod as $k => $v) {
                $ret[] = '<li><a onclick="ga(\'send\', \'event\', \'link\', \'click\', \'轮播图-No.' . substr($k, 1) . '\');" href="' . getUrl($v) . '" babyinfo="' . getInfo($v, $from) . '"><img src="' . getImg($v) . '" width="780" height="320"><p><span>' . getTitle($v, 22) . '</span></p></a></li>';
            }
        } elseif ($modId == '_2') {
            foreach ($arrMod as $k => $v) {
                if ($k != '_3') {
                    $ret[] = '<li><div><h5><img src="img/p_hot_d.jpg"><a onclick="ga(\'send\', \'event\', \'link\', \'click\', \'热点-No.' . substr($k, 1) . '\');" href="' . getUrl($v) . '" babyinfo="' . getInfo($v, $from) . '">' . getTitle($v, 15) . '</a></h5><p><a href="' . getUrl($v) . '" babyinfo="' . getInfo($v, $from) . '">' . getContent($v, 36) . '</a></p></div></li>';
                } else {
                    $ret[] = '<li class="li2"><div><h5><img src="img/p_hot_d.jpg"><a onclick="ga(\'send\', \'event\', \'link\', \'click\', \'热点-No.' . substr($k, 1) . '\');" href="' . getUrl($v) . '" babyinfo="' . getInfo($v, $from) . '">' . getTitle($v, 15) . '</a></h5><p><a href="' . getUrl($v) . '" babyinfo="' . getInfo($v, $from) . '">' . getContent($v, 36) . '</a></p></div></li>';
                }
            }
        } elseif ($modId == '_3') {
            foreach ($arrMod as $k => $v) {
                if ($k == '_2') {
                    $ret[] = '<li><span class="span2">' . getTag($v, 3) . '</span><a onclick="ga(\'send\', \'event\', \'link\', \'click\', \'政策解读-No.' . substr($k, 1) . '\');" href="' . getUrl($v) . '">' . getTitle($v, 15) . '</a></li>';
                } else {
                    $ret[] = '<li><span>' . getTag($v, 3) . '</span><a onclick="ga(\'send\', \'event\', \'link\', \'click\', \'政策解读-No.' . substr($k, 1) . '\');" href="' . getUrl($v) . '">' . getTitle($v, 15) . '</a></li>';
                }
            }
        } elseif ($modId == '_4') {
            foreach ($arrMod as $k => $v) {
                $ret[] = '<li><a class="left" onclick="ga(\'send\', \'event\', \'link\', \'click\', \'健康萌宝贝-No.' . substr($k, 1) . '\');" href="' . getUrl($v) . '" babyinfo="' . getInfo($v, $from) . '"><img src="' . getImg($v) . '" width="175" height="130"></a><a class="right" onclick="ga(\'send\', \'event\', \'link\', \'click\', \'健康萌宝贝-No.' . substr($k, 1) . '\');" href="' . getUrl($v) . '" babyinfo="' . getInfo($v, $from) . '"><h6>' . getTitle($v, 22) . '</h6><p>' . getContent($v, 60) . '</p></a></li>';
            }
        } elseif ($modId == '_5') {
            foreach ($arrMod as $k => $v) {
                $ret[] = '<div id="baby_posid5" class="lec_pic"><a onclick="ga(\'send\', \'event\', \'link\', \'click\', \'专家讲座-No.' . substr($k, 1) . '\');" href="' . getUrl($v) . '" babyinfo="' . getInfo($v, $from) . '"><img src="' . getImg($v) . '" width="330" height="245"><p>' . getTitle($v, 12) . '</p></a></div><h6 class="s_bt1 s_bt">' . getTag($v, 4) . '<i></i></h6>';
            }
        } elseif ($modId == '_6') {
            foreach ($arrMod as $k => $v) {
                $ret[] = '<p><a onclick="ga(\'send\', \'event\', \'link\', \'click\', \'讲座精选-No.' . substr($k, 1) . '\');" href="' . getUrl($v) . '" babyinfo="' . getInfo($v, $from) . '">' . getTitle($v, 18) . '</a></p>';
            }
        } elseif ($modId == '_7') {
            foreach ($arrMod as $k => $v) {
                if ($k == '_1') {
                    $ret[] = '<p><a onclick="ga(\'send\', \'event\', \'link\', \'click\', \'帮你帮我-No.' . substr($k, 1) . '\');" href="' . getUrl($v) . '" babyinfo="' . getInfo($v, $from) . '"><span style="color:#ff977f"><i>1</i>/</span>' . getTitle($v, 16) . '</a></p>';
                } else {
                    $ret[] = '<p><a onclick="ga(\'send\', \'event\', \'link\', \'click\', \'帮你帮我-No.' . substr($k, 1) . '\');" href="' . getUrl($v) . '" babyinfo="' . getInfo($v, $from) . '"><span><i>' . substr($k, 1) . '</i>/</span>' . getTitle($v, 16) . '</a></p>';
                }
            }
        } elseif ($modId == '_8') {
            foreach ($arrMod as $k => $v) {
                if ($k != '_3') {
                    $ret[] = '<li><a onclick="ga(\'send\', \'event\', \'link\', \'click\', \'宝宝看世界-No.' . substr($k, 1) . '\');" href="' . getUrl($v) . '" babyinfo="' . getInfo($v, $from) . '"><img src="' . getImg($v) . '" width="370" height="275"><p>' . getTitle($v, 12) . '</p></a><h6 class="s_bt3 s_bt">' . getTag($v, 4) . '<i></i></h6></li>';
                } else {
                    $ret[] = '<li class="m_r1"><a onclick="ga(\'send\', \'event\', \'link\', \'click\', \'宝宝看世界-No.' . substr($k, 1) . '\');" href="' . getUrl($v) . '" babyinfo="' . getInfo($v, $from) . '"><img src="' . getImg($v) . '" width="370" height="275"><p>' . getTitle($v, 12) . '</p></a><h6 class="s_bt3 s_bt">' . getTag($v, 4) . '<i></i></h6></li>';
                }
            }
        } elseif ($modId == '_9') {
            foreach ($arrMod as $k => $v) {
                if ($k == '_1') {
                    $ret[] = '<li><a onclick="ga(\'send\', \'event\', \'link\', \'click\', \'成长不烦恼-No.' . substr($k, 1) . '\');" href="' . getUrl($v) . '" babyinfo="' . getInfo($v, $from) . '"><img src="' . getImg($v) . '" width="235" height="235"><p>' . getTitle($v, 12) . '</p></a><h6 class="s_bt4 s_bt">' . getTag($v, 4) . '<i></i></h6></li>';
                } elseif ($k == '_2') {
                    $ret[] = '<li><a onclick="ga(\'send\', \'event\', \'link\', \'click\', \'成长不烦恼-No.' . substr($k, 1) . '\');" href="' . getUrl($v) . '" babyinfo="' . getInfo($v, $from) . '"><img src="' . getImg($v) . '" width="235" height="235"><p>' . getTitle($v, 12) . '</p></a><h6 class="s_bt5 s_bt">' . getTag($v, 4) . '<i></i></h6></li>';
                } else {
                    $ret[] = '<li class="m_r1"><a onclick="ga(\'send\', \'event\', \'link\', \'click\', \'成长不烦恼-No.' . substr($k, 1) . '\');" href="' . getUrl($v) . '" babyinfo="' . getInfo($v, $from) . '"><img src="' . getImg($v) . '" width="235" height="235"><p>' . getTitle($v, 12) . '</p></a><h6 class="s_bt4 s_bt">' . getTag($v, 4) . '<i></i></h6></li>';
                }
            }
        } elseif ($modId == '_10') {
            foreach ($arrMod as $k => $v) {
                if ($k == '_1' || $k == '_3' || $k == '_5') {
                    $ret[] = '<li class="li1"><p><a onclick="ga(\'send\', \'event\', \'link\', \'click\', \'论坛热议-No.' . substr($k, 1) . '\');" href="' . getUrl($v) . '" babyinfo="' . getInfo($v, $from) . '">' . getTitle($v, 18) . '</a></p></li>';
                } else {
                    $ret[] = '<li><p><a onclick="ga(\'send\', \'event\', \'link\', \'click\', \'论坛热议-No.' . substr($k, 1) . '\');" href="' . getUrl($v) . '" babyinfo="' . getInfo($v, $from) . '">' . getTitle($v, 18) . '</a></p></li>';
                }
            }
        } elseif ($modId == '_11') {
            foreach ($arrMod as $k => $v) {
                $ret[] = '<p class="p' . substr($k, 1) . '"><i></i><a onclick="ga(\'send\', \'event\', \'link\', \'click\', \'商户排行-No.' . substr($k, 1) . '\');" href="' . getUrl($v) . '" babyinfo="' . getInfo($v, $from) . '">' . getTitle($v, 16) . '</a></p>';
            }
        } elseif ($modId == '_12') {
            foreach ($arrMod as $k => $v) {
                if ($k == '_1' || $k == '_3' || $k == '_5' || $k == '_7') {
                    $ret[] = '<li class="li1"><a onclick="ga(\'send\', \'event\', \'link\', \'click\', \'热门讨论-No.' . substr($k, 1) . '\');" href="' . getUrl($v) . '" babyinfo="' . getInfo($v, $from) . '"><img src="' . getImg($v) . '" width="40" height="40"></a><span><a onclick="ga(\'send\', \'event\', \'link\', \'click\', \'热门讨论-No.' . substr($k, 1) . '\');" href="' . getUrl($v) . '" babyinfo="' . getInfo($v, $from) . '">' . getTitle($v, 6) . '</a></span></li>';
                } else {
                    $ret[] = '<li><a onclick="ga(\'send\', \'event\', \'link\', \'click\', \'热门讨论-No.' . substr($k, 1) . '\');" href="' . getUrl($v) . '" babyinfo="' . getInfo($v, $from) . '"><img src="' . getImg($v) . '" width="40" height="40"></a><span><a onclick="ga(\'send\', \'event\', \'link\', \'click\', \'热门讨论-No.' . substr($k, 1) . '\');" href="' . getUrl($v) . '" babyinfo="' . getInfo($v, $from) . '">' . getTitle($v, 6) . '</a></span></li>';
                }
            }
        } elseif ($modId == '_13') {
            foreach ($arrMod as $k => $v) {
                if ($k == '_1') {
                    $ret[] = '<li><a onclick="ga(\'send\', \'event\', \'link\', \'click\', \'缤纷体验-No.' . substr($k, 1) . '\');" href="' . getUrl($v) . '" babyinfo="' . getInfo($v, $from) . '"><img src="' . getImg($v) . '" width="170" height="170"><p>' . getTitle($v, 8) . '</p></a></li>';
                } else {
//.........这里部分代码省略.........
开发者ID:njxuquan,项目名称:baby,代码行数:101,代码来源:index.php


示例8: getTag

<?php

// Read the input
$input = $_GET['text'];
$hashValue = $_GET['hashValue'];
$fontSize = $_GET['fontSize'];
$style = $_GET['fontStyle'];
$fontStyle = getTag($style);
echo "<p style=\"font-size:{$fontSize};{$fontStyle}\">";
for ($i = 0; $i < strlen($input); $i++) {
    $charInt = ord($input[$i]);
    if ($i % 2 == 1) {
        $input[$i] = chr($charInt - $hashValue);
    } else {
        $input[$i] = chr($charInt + $hashValue);
    }
}
echo $input;
echo "</p>";
function getTag($style)
{
    switch ($style) {
        case "normal":
        case "italic":
            return "font-style:{$style};";
        case "bold":
            return "font-weight:bold;";
        default:
            return "";
    }
}
开发者ID:KonstantinKirchev,项目名称:PHP,代码行数:31,代码来源:PrettyTextHasher.php


示例9: array

    $tags_a = array();
    foreach ($tags as $tag) {
        $tags_a[] = "'" . $tag->name . "'";
    }
    return implode(',', $tags_a);
}
while ($query->have_posts()) {
    global $post;
    $query->the_post();
    $layout = $post->post_type;
    $title = get_the_title();
    $date = get_the_date('Y-m-d H:m:s');
    $author = get_the_author();
    $content = $post->post_content;
    if (EXPORT_ORIGINAL != fasle) {
        $content = apply_filters('the_content', $content);
        $content = str_replace(']]>', ']]&gt;', $content);
    }
    $category = getCategory();
    $tag = getTag();
    $filename = $post->post_name;
    $search = array("%layout%", "%title%", "%date%", "%author%", "%category%", "%tag%", "%content%");
    $replace = array($layout, $title, $date, $author, $category, $tag, $content);
    $export = str_replace($search, $replace, $template);
    if (!is_dir(EXPORT_DIR)) {
        mkdir(EXPORT_DIR);
    }
    $path = EXPORT_DIR . '/' . get_the_date('Y-m-d') . '-' . $filename . '.' . EXPORT_FORMAT;
    file_put_contents($path, $export);
    echo $title . '<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=> ' . $path . '<br /><br />';
}
开发者ID:neo1218,项目名称:gude,代码行数:31,代码来源:wordpress-export.php


示例10: customInstall

/**
 * @param array $dependency
 * @param array $installDir	directory where the dependency must be copied to
 * @param array $processed contains list of directories already scanned for dependency
 */
function customInstall($dependency, $installDir, &$processed)
{
    if (isset($dependency['autoload']['psr-0'])) {
        echo "error: The SDK you are trying to install or one of its dependeincies is namespace based. enter the specific version in composer.json to install non-namespace based SDK. Else download the latest SDK from github for namespace based SDK";
        exit;
    }
    $tagUrl = sprintf('https://api.github.com/repos/%s/%s/git/refs/tags/', $dependency['group'], $dependency['artifact']);
    $branchUrl = sprintf('https://api.github.com/repos/%s/%s/git/refs/heads/', $dependency['group'], $dependency['artifact']);
    $branchArray = extractRef($branchUrl);
    $tagsArray = extractRef($tagUrl);
    $dependency['branch'] = getTag($dependency['branch'], $tagsArray, $branchArray);
    // download zip from github
    $downloadUrl = sprintf('https://api.github.com/repos/%s/%s/zipball/%s', $dependency['group'], $dependency['artifact'], $dependency['branch']);
    if (!in_array($downloadUrl, $processed)) {
        echo "Downloading " . $dependency['artifact'] . ' - ' . $dependency['branch'] . PHP_EOL;
        $dest = 'vendor/' . $installDir . '/';
        $fileZip = tempnam(sys_get_temp_dir(), 'ppzip');
        $fp = fopen($fileZip, "w");
        curlExec($downloadUrl, $fp);
        $processed[] = $downloadUrl;
        // extract the downloaded zip
        $zip = new ZipArchive();
        if ($zip->open($fileZip) != "true") {
            echo PHP_EOL . "Could not open {$fileZip}";
            exit;
        }
        $zip->extractTo($dest);
        $zip->close();
        fclose($fp);
        unlink($fileZip);
        // scan extracted directory for nested dependency
        foreach (glob("{$dest}/**/composer.json") as $composer) {
            $json = file_get_contents($composer);
            $json_a = json_decode($json, true);
            $dependencies = getDependency($json_a);
            foreach ($dependencies as $dependency) {
                customInstall($dependency, $dependency['group'], $processed);
            }
        }
    }
}
开发者ID:brooklyntri,项目名称:btc-plugins,代码行数:46,代码来源:install.php


示例11: array

if (isset($_SESSION['ews_imported_users'])) {
    $_SESSION['ews_imported_users'] = array();
}
if (isset($_GET['action'])) {
    switch ($_GET['action']) {
        case 'login':
            login();
            break;
        case 'logoff':
            logoff();
            break;
        case 'search':
            search();
            break;
        case 'get_tag':
            return getTag();
            break;
        case 'mobileadd':
            mobileAdd();
            break;
        case 'mobile_addstoredtitles':
            mobileAddStoredTitles();
            break;
        case 'admin_register':
            adminRegister();
            break;
        case 'activate':
            activate();
            break;
        case 'reset_password':
            resetPassword();
开发者ID:ramant15,项目名称:ektimo,代码行数:31,代码来源:index.php


示例12: getTag



});
</script>
<table class="table table-bordered table-hover data-render">
<thead>
	<th>
		#
	</th>
	<th>Nama</th>
	<th>Deskripsi</th>
	<th>Slug</th>
</thead>
<tbody>
<?php 
$dParentView = getTag('term_id ASC');
if (!empty($dParentView)) {
    foreach ($dParentView as $rParentView) {
        ?>
		<tr>
			<td>				
					<a data-id="<?php 
        echo $rParentView->term_id;
        ?>
" href="javascript:;" class="btn btn-xs btn-info editbtn"><i class="fa fa-edit"></i></a>
					<a href="<?php 
        echo base_url(roleURIUser());
        ?>
/content/tags/delete?id=<?php 
        echo $rParentView->term_id;
        ?>
开发者ID:urangawak,项目名称:minangcms,代码行数:29,代码来源:tagscontent.php


示例13: playlistAdd

function playlistAdd($playlist, $toAdd)
{
    global $config;
    if (strpos($toAdd, "http://") === 0) {
        list($artist, $album, $title, $tracknum, $playtime_string, $bitrate) = getTag($toAdd);
        //$display = $artist." - ".$album." - ".$title;
        $display = $toAdd;
        $title = $toAdd;
        $token = md5(uniqid(rand(), true));
        $newFile = array("display" => $display, "filename" => $toAdd, "token" => $token, "album" => $album, "title" => $title, "artist" => $artist, "tracknum" => "", "lengths" => "1", "stream" => "1", "length" => "&infin;");
        $playlist[$token] = $newFile;
    } elseif (!file_exists($toAdd)) {
        doPrint("playlistAdd() : '" . $toAdd . "' does not exist");
    } elseif (is_file($toAdd)) {
        $toAdd = preg_replace("/\\/+/", "/", $toAdd);
        list($artist, $album, $title, $tracknum, $playtime_string, $bitrate) = getTag($toAdd);
        $display = $artist . " - " . $album . " - " . $tracknum . " - " . $title;
        if (empty($title)) {
            $title = basename($toAdd);
            $display = $title;
        }
        $playtime_seconds = 0;
        list($hour, $min, $sec) = explode(":", $playtime_string);
        if (empty($sec)) {
            $sec = $min;
            $min = $hour;
            $hour = 0;
        }
        $playtime_seconds = $hour * 3600 + $min * 60 + $sec;
        $token = md5(uniqid(rand(), true));
        $newFile = array("display" => $display, "filename" => $toAdd, "token" => $token, "album" => $album, "title" => $title, "artist" => $artist, "tracknum" => $tracknum, "lengths" => floor($playtime_seconds), "length" => $playtime_string, "bitrate" => $bitrate);
        $playlist[$token] = $newFile;
    } elseif (is_dir($toAdd)) {
        $toAdd = preg_replace("/\\/+/", "/", $toAdd);
        $files = array();
        $dirs = array();
        if ($handle = opendir($toAdd)) {
            while (false !== ($file = readdir($handle))) {
                if ($file != "." && $file != "..") {
                    if (is_dir($toAdd . "/" . $file)) {
                        $dirs[] = $file;
                    } else {
                        $tmp = explode(".", $file);
                        $ext = "." . array_pop($tmp);
                        if (in_array($ext, array_keys($config["ext"]))) {
                            $files[] = $file;
                        }
                    }
                }
            }
            closedir($handle);
        }
        natcasesort($dirs);
        natcasesort($files);
        foreach ($dirs as $dir) {
            $playlist = playlistAdd($playlist, $toAdd . "/" . $dir);
        }
        foreach ($files as $file) {
            $playlist = playlistAdd($playlist, $toAdd . "/" . $file);
        }
    } else {
        doPrint("playlistAdd() : '" . $toAdd . "' is whether file nor dir nor stream");
    }
    return $playlist;
}
开发者ID:sni,项目名称:webmp3,代码行数:65,代码来源:common.php


示例14: getTagReference

function getTagReference($tag_id)
{
    # Get tag object
    $tag_object = getTag($tag_id);
    # Get tag verses ids
    $tag_verses_ids = $tag_object->getTagVerses()->getPrimaryKeys();
    # Get verses objects
    $verses_objects = VerseQuery::create()->useTagVerseQuery()->filterByPrimaryKeys($tag_verses_ids)->endUse()->find();
    # Define tag reference data
    foreach ($verses_objects as $verse_object) {
        # Get verse data
        $verse_data = getVerseData($verse_object->getId());
        # Append verse data to tag reference data
        $tag_reference_data['book'] = $verse_data['book']['name'];
        $tag_reference_data['chapter'] = $verse_data['chapter'];
        $tag_reference_data['verses_numbers'][] = $verse_data['number'];
    }
    # Define tag reference
    $tag_reference = $tag_reference_data['book'] . ' ' . $tag_reference_data['chapter'] . ':' . getNumbersStringFromArray($tag_reference_data['verses_numbers']);
    # Return tag reference
    return $tag_reference;
}
开发者ID:arneau,项目名称:defender-app,代码行数:22,代码来源:tags.php


示例15: repPseRnd

 }
 if ($MAC['collect']['art']['psernd'] == 1) {
     $a_content = repPseRnd('art', $a_content, 0);
 }
 if ($MAC['collect']['art']['psesyn'] == 1) {
     $a_content = repPseSyn('art', $a_content);
 }
 $inrule = $MAC['collect']['art']['inrule'];
 $uprule = $MAC['collect']['art']['uprule'];
 $filter = $MAC['collect']['art']['filter'];
 if (strpos(',' . $filter, $d_name)) {
     $des = "数据在过滤单中,系统跳过采集err";
     exit;
 }
 if ($a_tag == '' && $MAC['collect']['art']['tag'] == 1) {
     $a_tag = getTag($a_name, $a_content);
 }
 $sql = "SELECT * FROM {pre}art WHERE a_name ='" . $a_name . "' ";
 if (strpos($inrule, 'b')) {
     $sql .= ' and a_type=' . $a_type;
 }
 $row = $db->getRow($sql);
 if (!$row) {
     $db->Add("{pre}art", array("a_name", "a_subname", "a_enname", "a_type", "a_letter", "a_content", "a_author", "a_color", "a_from", "a_pic", "a_hide", "a_hits", "a_dayhits", "a_weekhits", "a_monthhits", "a_up", "a_down", "a_level", "a_remarks", "a_tag", "a_addtime", "a_time"), array($a_name, $a_subname, $a_enname, $a_type, $a_letter, $a_content, $a_author, $a_color, $a_from, $a_pic, $a_hide, $a_hits, $a_dayhits, $a_weekhits, $a_monthhits, $a_up, $a_down, $a_level, $a_remarks, $a_tag, $a_addtime, $a_time));
 } else {
     if ($row['a_lock'] == 1) {
         $des = "数据已经锁定,系统跳过采集更新err";
         exit;
     }
     $colarr = array();
     $valarr = array();
开发者ID:klarclm,项目名称:sgv,代码行数:31,代码来源:admin_interface.php


示例16: cj


//.........这里部分代码省略.........
        $d_playserver = '';
        $d_playnote = '';
        $d_playurl = '';
        $d_tag = '';
        $color = 'red';
        $msg = '';
        if ($d_type < 1) {
            $des = "分类未绑定,系统跳过采集。";
        } elseif (empty($d_name)) {
            $des = "数据不完整,不进行处理。";
        } elseif (strpos(',' . $filter, $d_name)) {
            $des = "数据在过滤单中,系统跳过采集。";
        } else {
            $sql = "SELECT * FROM {pre}vod WHERE d_name ='" . $d_name . "' ";
            if (strpos($inrule, 'b')) {
                $sql .= ' and d_type=' . $d_type;
            }
            if (strpos($inrule, 'c')) {
                $sql .= ' and d_year=' . $d_year;
            }
            if (strpos($inrule, 'd')) {
                $sql .= ' and d_area=\'' . $d_area . '\'';
            }
            if (strpos($inrule, 'e')) {
                $sql .= ' and d_lang=\'' . $d_lang . '\'';
            }
            if (strpos($inrule, 'f')) {
                $sql .= ' and d_starring=\'' . $d_starring . '\'';
            }
            if (strpos($inrule, 'g')) {
                $sql .= ' and d_directed=\'' . $d_directed . '\'';
            }
            if ($MAC['collect']['vod']['tag'] == 1) {
                $d_tag = getTag($d_name, $d_content);
            }
            $row = $db->getRow($sql);
            if (!$row) {
                foreach ($array4[1] as $key => $value) {
                    if ($rc) {
                        $d_playfrom .= "\$\$\$";
                        $d_playserver .= "\$\$\$";
                        $d_playnote .= "\$\$\$";
                        $d_playurl .= "\$\$\$";
                    }
                    $d_playfrom .= getFrom($value);
                    if ($xt == "1") {
                        $d_playurl .= getVUrl($array4[2][$key]);
                    } else {
                        $d_playurl .= $array4[2][$key];
                    }
                    $d_playserver .= '0';
                    $d_playnote .= '';
                    $rc = true;
                }
                if ($MAC['collect']['vod']['pic'] == 1) {
                    $st = strrpos($d_pic, '/');
                    $fname = substring($d_pic, strlen($d_pic) - $st, $st + 1);
                    $path = "upload/vod/" . getSavePicPath('') . "/";
                    $thumbpath = "upload/vodthumb/" . getSavePicPath('vodthumb') . "/";
                    $ps = savepic($d_pic, $path, $thumbpath, $fname, 'vod', $msg);
                    if ($ps) {
                        $d_pic = $path . $fname;
                        $d_picthumb = $thumbpath . $fname;
                    }
                }
                if ($ct == "1") {
开发者ID:klarclm,项目名称:sgv,代码行数:67,代码来源:collect.php


示例17: closedir

            print "\t</song>\n";
        }
    }
    closedir($dh);
}
/* End of song listing */
/* Start of pattern listing */
$dir = "./";
if ($dh = opendir($dir)) {
    while (($file = readdir($dh)) !== false) {
        $extension = array_pop(explode(".", $file));
        if ($extension == "h2pattern") {
            $content = file($dir . $file);
            $xml = join(" ", $content);
            print "\t<pattern>\n";
            print "\t\t<name>" . getTag($xml, "<name>") . "</name>\n";
            print "\t\t<url>" . $url . $file . "</url>\n";
            print "\t</pattern>\n";
        }
    }
    closedir($dh);
}
/* End of pattern listing */
/* Start of drumkit listing */
$dir = "./";
if ($dh = opendir($dir)) {
    while (($file = readdir($dh)) !== false) {
        $extension = array_pop(explode(".", $file));
        if ($extension == "h2drumkit") {
            $content = file($dir . $file);
            $xml = join(" ", $content);
开发者ID:dangerzac,项目名称:hydrogen,代码行数:31,代码来源:hydrogen.php


示例18: getComments

function getComments($file_path)
{
    $source = file_get_contents($file_path);
    $tokens = token_get_all($source);
    foreach ($tokens as $token) {
        if (is_string($token)) {
            // simple 1-character token
            // ignore code tokens
        } else {
            // token array
            list($id, $text) = $token;
            switch ($id) {
                case T_CLASS:
                    return;
                    break;
                case T_DOC_COMMENT:
                    // This is the only case we care about
                    if (!beginsWith($text, '/*************************************')) {
                        echo '<ul>';
                        $head = getTag($text, '/**');
                        $author = getTag($text, '@author');
                        $return = getTag($text, '@return');
                        $a = getTags($text, '@param');
                        // Print the results
                        if ($head && strlen(trim($head)) > 0) {
                            echo "<li><STRONG>Header:</STRONG> {$head}</li>";
                        }
                        if ($return && strlen($return) > 0) {
                            echo "<li><STRONG>Return Value:</STRONG> {$return}</li>";
                        }
                        if ($author && strlen($author) > 0) {
                            echo "<li><STRONG>Author:</STRONG> {$author}</li>";
                        }
                        echo '<ul>';
                        foreach ($a as $s) {
                            echo "<li>{$s}</li>";
                        }
                        echo '</ul>';
                        echo '</ul>';
                    }
                    break;
                default:
                    // anything else -> ignore
                    break;
            }
        }
    }
}
开发者ID:jkinner,项目名称:ringside,代码行数:48,代码来源:index.php


示例19: error_reporting

error_reporting(E_ALL);
// read configuration file
$config = parse_ini_file("../../config.ini");
// i 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getTagCloudView函数代码示例发布时间:2022-05-15
下一篇:
PHP getTabname函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap