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

PHP text_filter函数代码示例

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

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



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

示例1: Header

if (!defined('AURACMS_admin')) {
    Header("Location: ../index.php");
    exit;
}
$script_include[] = $JS_SCRIPT;
$admin = '';
if (!cek_login()) {
    $admin .= '<h4 class="bg">Access Denied !!!!!!</h4>';
} else {
    global $koneksi_db, $PHP_SELF, $theme, $error;
    if ($_GET['aksi'] == "") {
        $admin .= '<div class="panel panel-info">
<div class="panel-heading"><b>Edit Password</b></div>';
        if (isset($_POST["submit"])) {
            $user = text_filter($_POST['user']);
            $password0 = md5($_POST["password0"]);
            $password1 = $_POST["password1"];
            $password2 = $_POST["password2"];
            $hasil = $koneksi_db->sql_query("SELECT password FROM useraura WHERE user='{$user}'");
            while ($data = $koneksi_db->sql_fetchrow($hasil)) {
                $password = $data['password'];
            }
            $error = '';
            if (!$password0) {
                $error .= "Error: Please enter your Old Password!<br />";
            }
            if (!$password1) {
                $error .= "Error: Please enter new password!<br />";
            }
            if (!$password2) {
开发者ID:rekysda,项目名称:elearningmetta,代码行数:30,代码来源:admin_gantipassword.php


示例2: md5

 $files = $_FILES['gambar']['name'];
 $tmp_files = $_FILES['gambar']['tmp_name'];
 $namagambar = md5(rand(1, 100) . $files) . '.jpg';
 $tempnews = 'mod/photo/images/temp/';
 $uploaddir = $tempnews . $namagambar;
 $uploads = move_uploaded_file($tmp_files, $uploaddir);
 if (file_exists($uploaddir)) {
     @chmod($uploaddir, 0644);
 }
 $tnews = 'mod/photo/images/thumb/';
 $gnews = 'mod/photo/images/normal/';
 $small = $tnews . $namagambar;
 $nsmall = $gnews . $namagambar;
 create_thumbnail($uploaddir, $nsmall, $new_width = 520, $new_height = 'auto', $quality = 100);
 $judul = text_filter($_POST['judul']);
 $kategori = text_filter($_POST['kategori']);
 $namafile_name = $_FILES['gambar']['name'];
 $gambar = $_POST['gambarlama'];
 $desc = $_POST['desc'];
 unlink($uploaddir);
 unlink($tnews . $gambar);
 unlink($gnews . $gambar);
 $hasil = $koneksi_db->sql_query("UPDATE photo SET judul='{$judul}',ket='{$desc}',kategori='{$kategori}', gambar='{$namagambar}' WHERE id='{$id}'");
 if ($hasil) {
     $admin .= '<div class="alert alert-success fade in">
                   <button data-dismiss="alert" class="close close-sm" type="button">
                       <i class="icon-remove"></i>
                   </button>
                   <strong>Wall Done !</strong> <br>Photo berhasil di Edit.
               </div>';
     $style_include[] = '<meta http-equiv="refresh" content="1; url=?pilih=photo&mod=yes" />';
开发者ID:rekysda,项目名称:naficms,代码行数:31,代码来源:admin_photo.php


示例3: edit_document

 /**
  * Edit a document based on $_POST and $_GET parameters 'dir' and 'path'
  *
  * @param 	array $_course array
  * @return 	void
  */
 function edit_document($_course)
 {
     global $_configuration;
     $dir = isset($_GET['dir']) ? $_GET['dir'] : $_POST['dir'];
     // please do not modify this dirname formatting
     if (strstr($dir, '..')) {
         $dir = '/';
     }
     if ($dir[0] == '.') {
         $dir = substr($dir, 1);
     }
     if ($dir[0] != '/') {
         $dir = '/' . $dir;
     }
     if ($dir[strlen($dir) - 1] != '/') {
         $dir .= '/';
     }
     $filepath = api_get_path('SYS_COURSE_PATH') . $_course['path'] . '/document' . $dir;
     if (!is_dir($filepath)) {
         $filepath = api_get_path('SYS_COURSE_PATH') . $_course['path'] . '/document/';
         $dir = '/';
     }
     $table_doc = Database::get_course_table(TABLE_DOCUMENT);
     if (isset($_POST['path']) && !empty($_POST['path'])) {
         $sql = "SELECT path\n\t\t\t\t\t\tFROM " . $table_doc . "\n\t\t\t\t\t\tWHERE id = " . Database::escape_string($_POST['path']);
         $res = Database::query($sql, __FILE__, __LINE__);
         $row = Database::fetch_array($res);
         $content = stripslashes($_POST['content_lp']);
         $file = $filepath . $row['path'];
         if ($fp = @fopen($file, 'w')) {
             $content = text_filter($content);
             $content = str_replace(api_get_path('WEB_COURSE_PATH'), $_configuration['url_append'] . '/courses/', $content);
             // change the path of mp3 to absolute
             // first regexp deals with ../../../ urls
             $content = preg_replace("|(flashvars=\"file=)(\\.+/)+|", "\$1" . api_get_path(REL_COURSE_PATH) . $_course['path'] . '/document/', $content);
             //second regexp deals with audio/ urls
             $content = preg_replace("|(flashvars=\"file=)([^/]+)/|", "\$1" . api_get_path(REL_COURSE_PATH) . $_course['path'] . '/document/$2/', $content);
             fputs($fp, $content);
             fclose($fp);
         }
     }
 }
开发者ID:Eidn,项目名称:shanghai,代码行数:48,代码来源:learnpath.class.php


示例4: int_filter

    		}
    $admin .= '
    		</select>*/
    $admin .= '<br />	
    <label>Keterangan</label><br /><textarea rows="10" cols="40" name="url">' . $url . '</textarea><br />
    <input type="submit" name="submit" value="Buat">
</form>   ';
    $admin .= '</div>';
}
if ($_GET['aksi'] == "edittopic") {
    $id = int_filter($_GET['id']);
    $admin .= '<div class="border">';
    $admin .= '<b>Edit Topik Baru dengan Id = ' . $id . '</b>';
    $admin .= '</div>';
    if (isset($_POST['submit'])) {
        $menu = text_filter($_POST['menu']);
        $url = $_POST['url'];
        $seftitle = AuraCMSSEO($menu);
        $parentid = $_POST['parentid'];
        $parentid = '0';
        $total = $koneksi_db->sql_query("SELECT * FROM topik WHERE topik = '" . $_POST['menu'] . "' and id != '" . $id . "'");
        $jumlah = $koneksi_db->sql_numrows($total);
        $error = '';
        if ($jumlah) {
            $error .= "Error: Duplicate Title of Topic {$judul}!<br />";
        }
        if (!$menu) {
            $error .= "Error: Please enter Title of Topic!<br />";
        }
        if (!$url) {
            $error .= "Error: Please enter Description of Topic!<br />";
开发者ID:rekysda,项目名称:tcms,代码行数:31,代码来源:admin_news.php


示例5: listLinksAndCategories

 public static function listLinksAndCategories($course_id, $session_id, $categoryId, $show = 'none', $token = null)
 {
     $tbl_link = Database::get_course_table(TABLE_LINK);
     $_user = api_get_user_info();
     $categoryId = intval($categoryId);
     /*	Action Links */
     echo '<div class="actions">';
     if (api_is_allowed_to_edit(null, true)) {
         echo '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&action=addlink&category_id=' . $categoryId . '">' . Display::return_icon('new_link.png', get_lang('LinkAdd'), '', ICON_SIZE_MEDIUM) . '</a>';
         echo '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&action=addcategory&category_id=' . $categoryId . '">' . Display::return_icon('new_folder.png', get_lang('CategoryAdd'), '', ICON_SIZE_MEDIUM) . '</a>';
     }
     $categories = Link::getLinkCategories($course_id, $session_id);
     $count = count($categories);
     if (!empty($count)) {
         echo '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&action=list&show=none">';
         echo Display::return_icon('view_remove.png', get_lang('shownone'), '', ICON_SIZE_MEDIUM) . '</a>';
         echo '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&action=list&show=all">';
         echo Display::return_icon('view_tree.png', get_lang('showall'), '', ICON_SIZE_MEDIUM) . '</a>';
     }
     echo '</div>';
     // Displaying the links which have no category (thus category = 0 or NULL),
     // if none present this will not be displayed
     $sql = "SELECT * FROM {$tbl_link}\n                WHERE c_id = {$course_id} AND category_id=0 OR category_id IS NULL";
     $result = Database::query($sql);
     $count = Database::num_rows($result);
     if ($count !== 0) {
         echo '<table class="data_table">';
         echo '<tr><th style="font-weight: bold; text-align:left;padding-left: 10px;">' . get_lang('General') . '</th></tr>';
         echo '</table>';
         self::showlinksofcategory(0);
     }
     $i = 0;
     $view = '0';
     $counter = 0;
     foreach ($categories as $myrow) {
         // Student don't see invisible categories.
         if (!api_is_allowed_to_edit(null, true)) {
             if ($myrow['visibility'] == 0) {
                 continue;
             }
         }
         // Validation when belongs to a session
         $showChildren = $categoryId == $myrow['id'] || $show == 'all';
         $session_img = api_get_session_image($myrow['session_id'], $_user['status']);
         $myrow['description'] = text_filter($myrow['description']);
         $strVisibility = '';
         $visibilityClass = null;
         if ($myrow['visibility'] == '1') {
             $strVisibility = '<a href="link.php?' . api_get_cidreq() . '&sec_token=' . $token . '&action=invisible&id=' . $myrow['id'] . '&scope=' . TOOL_LINK_CATEGORY . '" title="' . get_lang('Hide') . '">' . Display::return_icon('visible.png', get_lang('Hide'), array(), ICON_SIZE_SMALL) . '</a>';
         } elseif ($myrow['visibility'] == '0') {
             $visibilityClass = 'invisible';
             $strVisibility = ' <a href="link.php?' . api_get_cidreq() . '&sec_token=' . $token . '&action=visible&id=' . $myrow['id'] . '&scope=' . TOOL_LINK_CATEGORY . '" title="' . get_lang('Show') . '">' . Display::return_icon('invisible.png', get_lang('Show'), array(), ICON_SIZE_SMALL) . '</a>';
         }
         echo '<tr>';
         echo '<table class="data_table">';
         echo '<tr>';
         echo '<th width="81%" style="font-weight: bold; text-align:left;padding-left: 5px;">';
         if ($showChildren) {
             echo '<a class="' . $visibilityClass . '" href="' . api_get_self() . '?' . api_get_cidreq() . '&category_id=">';
             echo Display::return_icon('view_remove.png');
         } else {
             echo '<a class="' . $visibilityClass . '" href="' . api_get_self() . '?' . api_get_cidreq() . '&category_id=' . $myrow['id'] . '">';
             echo Display::return_icon('view_tree.png');
         }
         echo '&nbsp;&nbsp;' . Security::remove_XSS($myrow['category_title']) . '</a>
                 <br />&nbsp;&nbsp;&nbsp;' . $myrow['description'];
         echo '</th>';
         if (api_is_allowed_to_edit(null, true)) {
             if ($session_id == $myrow['session_id']) {
                 echo '<th>';
                 echo $strVisibility;
                 Link::showCategoryAdminTools($myrow, $counter, count($categories));
                 echo '</th>';
             } else {
                 echo '<th>' . get_lang('EditionNotAvailableFromSession');
             }
         }
         echo '</tr>';
         echo '</table>';
         if ($showChildren) {
             echo Link::showlinksofcategory($myrow['id']);
         }
         echo '</tr>';
         echo '</th>';
         echo '</tr>';
         echo '</table>';
         echo '</tr>';
         $counter++;
         /*
         
                     if ($myrow['visibility'] == '1') {
                         if (isset($urlview[$i]) && $urlview[$i] == '1') {
                             $newurlview = $urlview;
                             $newurlview[$i] = '0';
                             echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&urlview='.Security::remove_XSS($newurlview).'">';
                             echo '<img src="../img/icons/22/view_remove.png" />&nbsp;&nbsp;'.Security::remove_XSS($myrow['category_title']).'</a>
                             <br />&nbsp;&nbsp;&nbsp;'.$myrow['description'];
                             echo '</th>';
                             if (api_is_allowed_to_edit(null, true)) {
                                 if ($session_id == $myrow['session_id']) {
//.........这里部分代码省略.........
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:101,代码来源:link.lib.php


示例6: int_filter

    $admin .= "\n</select><br />\n<label>Isi keterangan</label><br /><textarea name='message' cols='40' rows='20' id='textarea1'>{$konten}</textarea><br />\n<label>Dokumen</label><br /><input type='file' name='dokumen' size='53'><br />\n<input type='submit' value='Kirim' name='submit'>\n</form></div>";
}
if ($_GET['aksi'] == "editnews") {
    $id = int_filter($_GET['id']);
    $topik = int_filter($_GET['topik']);
    $admin .= '<div class="border">';
    $admin .= '<b>Edit Download Dengan Id =' . $id . '</b>';
    $admin .= '</div>';
    if (isset($_POST['submit'])) {
        define("GIS_GIF", 1);
        define("GIS_JPG", 2);
        define("GIS_PNG", 3);
        define("GIS_SWF", 4);
        include "includes/hft_image.php";
        $judul = text_filter($_POST['judul']);
        $konten = text_filter($_POST['message']);
        $dokumen_name = $_FILES['dokumen']['name'];
        $error = '';
        if (!$judul) {
            $error .= "Error: Please enter Title of Download!<br />";
        }
        //if (!$konten) $error .= "Error: Please enter Content of Download!<br />";
        if ($error) {
            $admin .= '<div class="error">' . $error . '</div>';
        } else {
            if (!empty($dokumen_name)) {
                $dokumen = $_FILES['dokumen']['name'];
                $type_dokumen = $_FILES['dokumen']['type'];
                $tmp_dokumen = $_FILES['dokumen']['tmp_name'];
                $tempdokumen = 'mod/download/dokumen/';
                $namadokumen = $dokumen;
开发者ID:rekysda,项目名称:naficms,代码行数:31,代码来源:admin_download.php


示例7: kirim_mail

function kirim_mail($email, $smail, $subject, $message, $id = "", $pr = "")
{
    $email = text_filter($email);
    $smail = text_filter($smail);
    $subject = text_filter($subject);
    $id = intval($id);
    $pr = !$pr ? "3" : "" . intval($pr) . "";
    $mheader = "MIME-Version: 1.0\n" . "Content-Type: text/html; charset=utf-8\n" . "Reply-To: \"{$smail}\" <{$smail}>\n" . "From: \"{$smail}\" <{$smail}>\n" . "Return-Path: <{$smail}>\n" . "X-Priority: {$pr}\n" . "X-Mailer: Teamworks v2.3 Mailer\n";
    @mail($email, $subject, $message, $mheader);
}
开发者ID:rekysda,项目名称:talsurabaya,代码行数:10,代码来源:fungsi.php


示例8: selectDescription

 /**
  * returns the question description
  *
  * @author Olivier Brouckaert
  * @return string - question description
  */
 function selectDescription()
 {
     $this->description = text_filter($this->description);
     return $this->description;
 }
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:11,代码来源:question.class.php


示例9: int_filter

<td style="padding-right:5px;padding-bottom:5px;"></td>
<td style="padding-left:5px;padding-bottom:5px;"></td>
<td style="padding-left:5px;padding-bottom:5px;"><input type="submit" name="submit" value="Submit" class="button"></td>
</tr>
</table>
</form>
</div>';
}
##########################
# EDIT ONGKIR
##########################
if ($_GET['aksi'] == 'edit_ongkir') {
    $idk = int_filter($_GET['idk']);
    if (isset($_POST['submit'])) {
        $kota = text_filter($_POST['kota']);
        $ongkir = text_filter($_POST['ongkir']);
        $error = '';
        if (!$kota) {
            $error .= "Error: Silahkan isi kota tujuan!<br />";
        }
        if (!$ongkir) {
            $error .= "Error: Silahkan isi harga pengiriman!<br />";
        }
        if ($error) {
            $tengah .= '<div class="error">' . $error . '</div>';
        } else {
            $hasil = $koneksi_db->sql_query("UPDATE ongkir SET kota='{$kota}',ongkir='{$ongkir}' WHERE idk='{$idk}'");
            if ($hasil) {
                $tengah .= '<div class="sukses">Ongkos Kirim berhasil di update</div>';
                $style_include[] = '<meta http-equiv="refresh" content="1; url=?pilih=ongkir&mod=yes" />';
            } else {
开发者ID:rekysda,项目名称:talsurabaya,代码行数:31,代码来源:admin_ongkir.php


示例10: edit_document

 /**
  * Edit a document based on $_POST and $_GET parameters 'dir' and 'path'
  * @param 	array $_course array
  * @return 	void
  */
 public function edit_document($_course)
 {
     $course_id = api_get_course_int_id();
     global $_configuration;
     $dir = isset($_GET['dir']) ? $_GET['dir'] : $_POST['dir'];
     // Please, do not modify this dirname formatting.
     if (strstr($dir, '..')) {
         $dir = '/';
     }
     if ($dir[0] == '.') {
         $dir = substr($dir, 1);
     }
     if ($dir[0] != '/') {
         $dir = '/' . $dir;
     }
     if ($dir[strlen($dir) - 1] != '/') {
         $dir .= '/';
     }
     $filepath = api_get_path(SYS_COURSE_PATH) . $_course['path'] . '/document' . $dir;
     if (!is_dir($filepath)) {
         $filepath = api_get_path(SYS_COURSE_PATH) . $_course['path'] . '/document/';
         $dir = '/';
     }
     $table_doc = Database::get_course_table(TABLE_DOCUMENT);
     if (isset($_POST['path']) && !empty($_POST['path'])) {
         $document_id = intval($_POST['path']);
         $sql = "SELECT path FROM " . $table_doc . " WHERE c_id = {$course_id} AND id = " . $document_id;
         $res = Database::query($sql);
         $row = Database::fetch_array($res);
         $content = stripslashes($_POST['content_lp']);
         $file = $filepath . $row['path'];
         if ($fp = @fopen($file, 'w')) {
             $content = text_filter($content);
             $content = str_replace(api_get_path(WEB_COURSE_PATH), $_configuration['url_append'] . '/courses/', $content);
             // Change the path of mp3 to absolute.
             // The first regexp deals with ../../../ urls.
             $content = preg_replace("|(flashvars=\"file=)(\\.+/)+|", "\$1" . api_get_path(REL_COURSE_PATH) . $_course['path'] . '/document/', $content);
             // The second regexp deals with audio/ urls.
             $content = preg_replace("|(flashvars=\"file=)([^/]+)/|", "\$1" . api_get_path(REL_COURSE_PATH) . $_course['path'] . '/document/$2/', $content);
             fputs($fp, $content);
             fclose($fp);
             $sql_update = "UPDATE " . $table_doc . " SET title='" . Database::escape_string($_POST['title']) . "' WHERE c_id = " . $course_id . " AND id = " . $document_id;
             Database::query($sql_update);
         }
     }
 }
开发者ID:axomar,项目名称:ITS,代码行数:51,代码来源:learnpath.class.php


示例11: int_filter

##########################
# EDIT PRODUK
##########################
if ($_GET['aksi'] == 'edit_produk') {
    $id = int_filter($_GET['id']);
    if (isset($_POST['submit'])) {
        define("GIS_GIF", 1);
        define("GIS_JPG", 2);
        define("GIS_PNG", 3);
        define("GIS_SWF", 4);
        include "includes/hft_image.php";
        $judul = text_filter($_POST['judul']);
        $kategori = text_filter($_POST['kategori']);
        $desc = $_POST['desc'];
        $gambar = $_FILES['gambar']['name'];
        $gambar_lama = text_filter($_POST['gambar_lama']);
        $gambartambahan = $_FILES['gambartambahan']['name'];
        $tgl = $_POST['tgl'];
        $client = $_POST['client'];
        $kota = $_POST['kota'];
        $jenis = $_POST['jenis'];
        $error = '';
        if (!$judul) {
            $error .= "Error: Silahkan Isi Nama Produknya!<br />";
        }
        if (!$desc) {
            $error .= "Error: Silahkan Isi Keterangannya!<br />";
        }
        if ($error) {
            $tengah .= '<div class="error">' . $error . '</div>';
        } else {
开发者ID:rekysda,项目名称:talsurabaya,代码行数:31,代码来源:admin_katalog.php


示例12: int_filter

</tr>
</table>
</form>
</div>';
}
##########################
# EDIT BANK
##########################
if ($_GET['aksi'] == 'edit_bank') {
    $id = int_filter($_GET['id']);
    if (isset($_POST['submit'])) {
        $bank = text_filter($_POST['bank']);
        $nama = text_filter($_POST['nama']);
        $rekening = $_POST['rekening'];
        $logo = $_FILES['logo']['name'];
        $logo_lama = text_filter($_POST['gambar_logo']);
        $error = '';
        if (!$bank) {
            $error .= "Error: Silahkan Isi Nama Bank Anda!<br />";
        }
        if (!$nama) {
            $error .= "Error: Silahkan Isi Nama Akun Bank Anda!<br />";
        }
        if (!$rekening) {
            $error .= "Error: Silahkan Isi Nomor Rekening Bank Anda!<br />";
        }
        if ($error) {
            $tengah .= '<div class="error">' . $error . '</div>';
        }
        $hasil = $koneksi_db->sql_query("UPDATE bank SET bank='{$bank}',nama='{$nama}',rekening='{$rekening}' WHERE id='{$id}'");
        if ($hasil) {
开发者ID:rekysda,项目名称:naficms,代码行数:31,代码来源:admin_bank.php


示例13: exportitem


//.........这里部分代码省略.........
                if ($barreMois != api_format_date($start_date_local, "%m")) {
                    // 3.1.1 Update the check value for the month bar.
                    $barreMois = api_format_date($start_date_local, "%m");
                    // 3.1.2 Display the month bar.
                    $expcontent .= "<tr><td id=\"title\" colspan=\"2\" class=\"month\" valign=\"top\">".api_format_date($start_date_local, "%B %Y")."</td></tr>";
                }

                // 3.2 Display the agenda items (of this month): the date, hour and title.
                $db_date = (int) api_format_date($start_date_local, "%d");
                if ($_GET['day'] != $db_date) {
                    // 3.2.1.a If the day given in the URL (might not be set) is different from this element's day, use style 'data'.
                    $expcontent .= "<tr><td class=\"data\" colspan='2'>";
                } else {
                    // 3.2.1.b Else (same day) use style 'datanow'.
                    $expcontent .= "<tr><td class=\"datanow\" colspan='2'>";
                }
                // 3.2.2 Mark an anchor for this date.
                $expcontent .= "<a name=\"".$db_date."\"></a>"; // anchoring
                // 3.2.3 Write the date and time of this event to the export string.
                $expcontent .= api_format_date($start_date_local);
                // 3.2.4 If a duration is set, write it, otherwise ignore.
                if ($myrow['duration'] == '') {
                    $expcontent .= "<br />";
                } else {
                    $expcontent .= " / ".$langLasting." ".$myrow['duration']."<br />"; //langLasting comes from lang/x/agenda.inc.php
                }
                // 3.2.5 Write the title.
                $expcontent .= $myrow['title'];
                $expcontent .= "</td></tr>";
                // 3.2.6 Prepare the content of the agenda item.
                $content = $myrow['content'];
                // 3.2.7 Make clickable???
                $content = make_clickable($content);
                $content = text_filter($content);
                // 3.2.8 Write the prepared content to the export string.
                $expcontent .= "<tr><td class=\"text\" colspan='2'>";
                $expcontent .= $content;
                $expcontent .= "</td></tr>";

                // Displaying the agenda item of this month: the added resources.
                // This part is not included into LP export.
                /*if (check_added_resources("Agenda", $myrow['id'])) {
                    $content.= "<tr><td colspan='2'>";
                    $content.= "<i>".get_lang('AddedResources')."</i><br />";
                    display_added_resources("Agenda", $myrow['id']);
                    $content.= "</td></tr>";
                }*/

            }
            // 4. Finish the export string.
            $expcontent .= "<tr></table>";

            break;

        // ANNOUNCEMENT BEGIN
        case 'Ad_Valvas':
            // 1. Get the announcement data from the database
            $tbl_announcement = Database::get_course_table(TABLE_ANNOUNCEMENT);
            $sql = "SELECT * FROM $tbl_announcement WHERE c_id = $course_id AND id='$item_id'";
            $result = Database::query($sql);

            // 2. Initialise export string
            $expcontent .= "<table class=\"data_table\">";

            // 3. For each announcement matching the query
            while ($myrow = Database::fetch_array($result)) {
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:67,代码来源:learnpath_functions.inc.php


示例14: foreach

    foreach ($resultcategories as $myrow) {
        // Validation when belongs to a session
        $session_img = api_get_session_image($myrow['session_id'], $_user['status']);

        //if (!isset($urlview)) {
        if ($urlview == '') {
            // No $view set in the url, thus for each category link it should be all zeros except it's own
            makedefaultviewcode($i);
        } else {
            $view = $urlview;
            $view[$i] = '1';
        }
        // If the $urlview has a 1 for this categorie, this means it is expanded and should be desplayed as a
        // - instead of a +, the category is no longer clickable and all the links of this category are displayed
        $myrow['description'] = text_filter($myrow['description']);

        $strVisibility = '';
        if ($myrow['visibility'] == '1') {
            $strVisibility =  '<a href="link.php?' . api_get_cidreq() .  '&amp;sec_token='.$token.'&amp;action=invisible&amp;id=' . $myrow['id'] . '&amp;scope=' . TOOL_LINK_CATEGORY . '" title="' . get_lang('Hide') . '">' .
                Display :: return_icon('visible.png', get_lang('Hide'), array (), ICON_SIZE_SMALL) . '</a>';
        } elseif ($myrow['visibility'] == '0') {
            $strVisibility =  ' <a href="link.php?' . api_get_cidreq() .  '&amp;sec_token='.$token.'&amp;action=visible&amp;id=' . $myrow['id'] . '&amp;scope=' . TOOL_LINK_CATEGORY . '" title="' . get_lang('Show') . '">' .
                Display :: return_icon('invisible.png', get_lang('Show'), array (), ICON_SIZE_SMALL) . '</a>';
        }

        if ($myrow['visibility'] == '1') {
            if (isset($urlview[$i]) && $urlview[$i] == '1') {
                $newurlview = $urlview;
                $newurlview[$i] = '0';
                echo '<tr>';
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:30,代码来源:link.php


示例15: Header

/**
 * Teamworks v2.3
 * http://www.teamworks.co.id
 * December 03, 2007 07:29:56 AM 
 * Author: Teamworks Creative - [email protected] - +6285732037068 - pin 25b7edd4
 */
if (!defined('AURACMS_CONTENT')) {
    Header("Location: ../index.php");
    exit;
}
global $koneksi_db, $email_master, $judul_situs, $alamatkantor;
$index_hal = 1;
if (isset($_POST['submit'])) {
    $nama = text_filter($_POST['nama']);
    $email = text_filter($_POST['email']);
    $pesan = nl2br(text_filter($_POST['pesan'], 2));
    $error = '';
    if (!is_valid_email($email)) {
        $error .= "Error: E-Mail address invalid!<br />";
    }
    $gfx_check = $_POST['gfx_check'];
    if (!$nama) {
        $error .= "Error: Please enter your name!<br />";
    }
    if (!$pesan) {
        $error .= "Error: Please enter a message!<br />";
    }
    // $code = substr(hexdec(md5("".date("F j")."".$_POST['random_num']."".$sitekey."")), 2, 6);
    if ($gfx_check != $_SESSION['Var_session'] or !isset($_SESSION['Var_session'])) {
        $error .= "Security Code Invalid <br />";
    }
开发者ID:rekysda,项目名称:rumahsenisinlui,代码行数:31,代码来源:contact.php


示例16: int_filter

     if ($hasil) {
         $admin .= '<div class="sukses">Mata Pelajaran berhasil dihapus! .</div>';
         $style_include[] = '<meta http-equiv="refresh" content="1; url=admin.php?pilih=mapel&mod=yes" />';
     }
 }
 if ($_GET['aksi'] == 'edit') {
     $id = int_filter($_GET['id']);
     if (isset($_POST['submit'])) {
         define("GIS_GIF", 1);
         define("GIS_JPG", 2);
         define("GIS_PNG", 3);
         define("GIS_SWF", 4);
         include "includes/hft_image.php";
         $mapel = $_POST['mapel'];
         $icon = $_FILES['icon']['name'];
         $icon_lama = text_filter($_POST['icon_lama']);
         $error = '';
         if (!$mapel) {
             $error .= "Error: Silahkan Isi Nama mapel<br />";
         }
         if (!$tunjangan) {
             $tunjangan = '0';
         }
         if ($koneksi_db->sql_numrows($koneksi_db->sql_query("SELECT mapel FROM mapel WHERE mapel='{$mapel}' and id<>'{$id}'")) > 0) {
             $error .= "Error: mapel " . $mapel . " sudah terdaftar , silahkan ulangi.<br />";
         }
         if ($error) {
             $tengah .= '<div class="error">' . $error . '</div>';
         } else {
             if (!empty($icon)) {
                 $files = $_FILES['icon']['name'];
开发者ID:rekysda,项目名称:elearningmetta,代码行数:31,代码来源:admin_mapel.php


示例17: header

    $admin .= '<div class="error">komentar telah di Un Publish</div>';
    header("location:?pilih=news&mod=yes&aksi=listkomentar");
    exit;
}
if ($_GET['aksi'] == "tambahsubgambar") {
    $id = int_filter($_GET['id']);
    $admin .= '<div class="border">';
    $admin .= '<b>Tambah Sub Gambar Id =' . $id . '</b>';
    $admin .= '</div>';
    if (isset($_POST['submit'])) {
        define("GIS_GIF", 1);
        define("GIS_JPG", 2);
        define("GIS_PNG", 3);
        define("GIS_SWF", 4);
        include "includes/hft_image.php";
        $judul = text_filter($_POST['subjudul']);
        $namafile_name = $_FILES['gambar']['name'];
        $error = '';
        //if (!$subnamafile_name)  $error .= "Error: Please enter Sub Gambar , Judul : $judul2<br />";
        //if ($jumlah) $error .= "Error: Duplicate Title of News $judul!<br />";
        if (!$judul) {
            $error .= "Error: Please enter Title of Sub!<br />";
        }
        if (!$namafile_name) {
            $error .= "Error: Please enter File!<br />";
        }
        //if (!$konten) $error .= "Error: Please enter Content of News!<br />";
        if ($error) {
            $admin .= '<div class="error">' . $error . '</div>';
        } else {
            if (!empty($namafile_name)) {
开发者ID:rekysda,项目名称:spinschool2,代码行数:31,代码来源:admin_news.php


示例18: header

            header("location:admin.php?pilih=bukuoperasional&mod=yes&aksi=laporanbukuoperasional");
            exit;
        } else {
            header("location:admin.php?pilih=bukuoperasional&mod=yes");
            exit;
        }
    }
    ////////////////////////////////////////////////////////////////////////////////
    if ($_GET['aksi'] == "addsekolah") {
        $admin .= '<div class="border">';
        $admin .= '<b>Buat Sekolah Baru ' . $LevelAkses . '</b><br>
<b>catatan :</b> Anda dapat melakukan editing atau Hapus data pada halaman ini.
';
        $admin .= '</div>';
        if (isset($_POST['submit'])) {
            $sekolah = text_filter($_POST['sekolah']);
            $error = '';
            if (!$sekolah) {
                $error .= "Error: sekolah harus diisi !<br />";
            }
            if ($error) {
                $admin .= '<div class="error">' . $error . '</div>';
            } else {
                $hasil = $koneksi_db->sql_query("INSERT INTO sekolah (sekolah,user,tgl1) VALUES ('{$sekolah}','{$user}','{$tglskrg}')");
                $admin .= '<div class="sukses"><b>sekolah  Berhasil di Buat.</b></div>';
                unset($sekolah);
            }
        }
        $sekolah = !isset($sekolah) ? '' : $sekolah;
        $admin .= '<div class="border">';
        $admin .= '
开发者ID:rekysda,项目名称:sultanindo,代码行数:31,代码来源:admin_bukuoperasional_bc.php


示例19: int_filter

<span class="help-block"></span>
</div>
</div>';
        $admin .= '<div class="form-group">
<label class="col-sm-2 control-label"></label>
<div class="col-sm-10"><input type="submit" name="submit" value="Simpan" class="btn btn-success" /></div>
</div>';
        $admin .= '</form></div></section>';
    }
    if ($_GET['aksi'] == 'edit') {
        if (isset($_POST['submit'])) {
            $id = int_filter($_GET['id']);
            $level = $_POST['level'];
            $tipe = $_POST['tipe'];
            $email = text_filter($_POST['email']);
            $nama = text_filter($_POST['nama']);
            //if (!is_valid_email($email)) $error .= "Error, E-Mail address invalid!<br />";
            if ($koneksi_db->sql_numrows($koneksi_db->sql_query("SELECT email FROM useraura WHERE email='{$email}' and UserId!='{$id}'")) > 0) {
                $error .= "Error: Email " . $email . " sudah terdaftar , silahkan ulangi.<br />";
            }
            if ($error) {
                $admin .= '<div class="alert alert-warning fade in">
                                  <button data-dismiss="alert" class="close close-sm" type="button">
                                      <i class="icon-remove"></i>
                                  </button>
                                  <strong>Error !</strong> <br>' . $error . '.
                              </div>';
            } else {
                $up = mysql_query("UPDATE `useraura` SET `level`='{$level}',`tipe`='{$tipe}',`email`='{$email}',`nama`='{$nama}' WHERE `UserId`='{$id}'");
                $admin .= '<div class="alert alert-success fade in">
                                  <button data-dismiss="alert" class="close close-sm" type="button">
开发者ID:rekysda,项目名称:hotelfratz,代码行数:31,代码来源:admin_users.php


示例20: text_filter

$admin  ='<h4 class="page-header">Pengaturan</h4>';

######################################
# Edit Password Admin
######################################
if($_GET['aksi']==""){

$admin .='<ol class="breadcrumb">
  <li><a href="?pilih=settingwebsite&mod=yes">Pengaturan</a></li>
  <li class="active">Password</li>
</ol>';

if (isset($_POST["submit"])) {

$user		   = text_filter($_POST['user']);
$email	      = text_filter($_POST['email']);
$password0 = md5($_POST["password0"]);
$password1 = $_POST["password1"];
$password2 = $_POST["password2"];

$hasil = $koneksi_db->sql_query( "SELECT password,email FROM psbcalon_useraura WHERE user='$user'" );
while ($data = $koneksi_db->sql_fetchrow($hasil)) {
	$password=$data['password'];
	$email0=$data['email'];
	}
$error = '';
if (!$password0)  $error .= "Error: Please enter your Old Password!<br />";
if (!$password1)  $error .= "Error: Please enter new password!<br />";
if (!$password2)  $error .= "Error: Please retype your your new password!<br />";
checkemail($email);
if ($password0 != $password)  $error .= "Invalid old pasword, silahkan ulangi lagi.<br />";
开发者ID:nickohappy7,项目名称:sister,代码行数:31,代码来源:admin_settingwe

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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