コード例 #1
0
     for ($i = 0; $i < count($tags->result); $i++) {
         $item['tag'] = $tags->result[$i]->tag;
         $result[] = $item;
         //				echo html_entity_decode($tags->result[$i]->tag)."\n";
     }
     echo json_encode($result);
     break;
     // Bestelldetail Tags
 // Bestelldetail Tags
 case 'detail_tags':
     //	$detail = $_REQUEST['detail_id'];
     $tag_search = trim(isset($_REQUEST['term']) ? $_REQUEST['term'] : '');
     //if (is_null($detail) || $tag_search=='')
     //	exit();
     $tags = new tags();
     if (!$tags->getAll()) {
         exit($tags->errormsg . "\n");
     }
     $result = array();
     for ($i = 0; $i < count($tags->result); $i++) {
         $item['tag'] = $tags->result[$i]->tag;
         $result[] = $item;
         //				echo html_entity_decode($tags->result[$i]->tag)."\n";
     }
     echo json_encode($result);
     break;
 case 'wawi_mitarbeiter_search':
     $search = trim(isset($_REQUEST['term']) ? $_REQUEST['term'] : '');
     if (is_null($search) || $search == '') {
         exit;
     }
コード例 #2
0
ファイル: list.php プロジェクト: yunsite/demila
<?php

// +----------------------------------------------------------------------
// | Demila [ Beautiful Digital Content Trading System ]
// +----------------------------------------------------------------------
// | Copyright (c) 2015 http://demila.org All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Email author@demila.org
// +----------------------------------------------------------------------
_setView(__FILE__);
_setTitle($langArray['list']);
$cms = new tags();
$data = $cms->getAll();
abr('data', $data);
require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';
コード例 #3
0
ファイル: form.php プロジェクト: yunsite/demila
        $itemsClass = new items();
        $s = $itemsClass->add();
        if ($s === true) {
            refresh('/' . $languageURL . 'author_dashboard/', $langArray['complete_upload_item'], 'complete');
        } else {
            $message = '<ul>';
            foreach ($s as $e) {
                $message .= '<li>' . $e . '</li>';
            }
            $message .= '</ul>';
            addErrorMessage($message, '', 'error');
        }
    }
    $fileTypes = '';
    foreach ($config['upload_ext'] as $ext) {
        if ($fileTypes != '') {
            $fileTypes .= ';';
        }
        $fileTypes .= '*.' . $ext;
    }
    abr('fileTypes', $fileTypes);
    abr('sessID', session_id());
}
//获取所有推荐标签
require_once ROOT_PATH . '/apps/tags/models/tags.class.php';
$tagsClass = new tags();
$tags_all = $tagsClass->getAll();
$all_tags = json_encode($tags_all);
abr('all_tags', $all_tags);
#面包屑
abr('breadcrumb', '<a href="/' . $languageURL . '" title="">' . $langArray['home'] . '</a> \\ <a href="/' . $languageURL . 'upload/form/?category=' . $_GET['category'] . '" title="">' . $langArray['upload_theme'] . '</a>');
コード例 #4
0
ファイル: index.php プロジェクト: yunsite/demila
<?php

// +----------------------------------------------------------------------
// | Demila [ Beautiful Digital Content Trading System ]
// +----------------------------------------------------------------------
// | Copyright (c) 2015 http://demila.org All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Email author@demila.org
// +----------------------------------------------------------------------
_setView(__FILE__);
if (!isset($_GET['q'])) {
    $_GET['q'] = '';
}
if (!isset($_GET['limit'])) {
    $_GET['limit'] = 10;
}
if (!is_int($_GET['limit'])) {
    die("Illegal Operation !");
}
$tagsClass = new tags();
$tags = $tagsClass->getAll(0, $_GET['limit'], " `name` LIKE '%" . sql_quote($_GET['q']) . "%' ");
if (is_array($tags)) {
    foreach ($tags as $t) {
        echo $t['name'] . "\n";
    }
}