Example #1
0
/**
 * Prints a <select> of the available channels
/**/
function channel_select($params = '', $selected = '', $id = 00)
{
    $channels = Channel::getChannelList();
    echo "\n<select name=\"chan_{$id}\" {$params}>";
    foreach ($channels as $chanid) {
        $channel =& Channel::find($chanid);
        // Not visible?
        if (empty($channel->visible) || $channel->chanid == 91010) {
            continue;
        }
        // Print the option
        echo '
                <option value="', $channel->chanid, '"', ' title="', html_entities($channel->name), '"';
        // Selected?
        if ($channel->chanid == $selected || $channel->chanid == $_GET['chanid']) {
            echo ' SELECTED';
        }
        // Print the rest of the content
        echo '>';
        if ($_SESSION["prefer_channum"]) {
            echo $channel->channum . '&nbsp;&nbsp;(' . html_entities($channel->callsign) . ')';
        } else {
            echo html_entities($channel->callsign) . '&nbsp;&nbsp;(' . $channel->channum . ')';
        }
        echo '</option>';
    }
    echo '</select>';
}
/**
 * Prints a <select> of the available recording inputs
 **/
function input_select($selected, $ename = 'prefinput')
{
    static $inputs;
    // Gather the data
    if (empty($inputs)) {
        global $db;
        $sh = $db->query('SELECT cardid,
                                     IF(LENGTH(IFNULL(displayname,"")) > 0,
                                        displayname,
                                        CONCAT(cardid, ":", inputname)
                                       ) AS name
                                FROM capturecard
                            ORDER BY name');
        while (list($id, $name) = $sh->fetch_row()) {
            $inputs[$id] = $name;
        }
        $sh->finish();
    }
    // Only one input?
    if (count($inputs) == 1) {
        list($id, $name) = reset($inputs);
        echo '<input type="hidden" name="', $ename, '" value="0">', t('Any');
    } else {
        echo '<select name="', $ename, '">', '<option value="0">', t('Any'), '</option>';
        foreach ($inputs as $id => $name) {
            echo '<option value="', $id, '"';
            if ($selected && $id == $selected) {
                echo ' SELECTED';
            }
            echo '>', html_entities($name), '</option>';
        }
        echo '</select>';
    }
}
 function _generate_email_markup($contents)
 {
     $return = '';
     foreach ($contents as $content) {
         if (isset($content['tag'])) {
             $return .= '<' . $content['tag'];
         }
         if (isset($content['css'])) {
             $return .= ' style="' . htmlentities($content['css']) . '"';
         }
         if (isset($content['tag'])) {
             $return .= '>';
         }
         foreach ($content as $i => $c) {
             if ($i != 'tag' && $i != 'css') {
                 if (is_array($c)) {
                     $return .= _generate_email_markup($c);
                 } else {
                     $return .= auto_link(html_entities($c));
                 }
             }
         }
         if (isset($content['tag'])) {
             $return .= '</' . $content['tag'] . '>';
         }
     }
     return $return;
 }
Example #4
0
function getOptionEvent2()
{
    extract(html_entities($_POST));
    $q = mysql_query("SELECT * FROM event WHERE `status`='" . $status . "' ORDER BY kode DESC");
    while ($r = mysql_fetch_array($q)) {
        echo '<option value="' . $r['id'] . '">' . $r['kode'] . ' - ' . $r['nama'] . '</option>';
    }
}
Example #5
0
function html_encode($str, $skip_html_tag_characters = false)
{
    if (!$skip_html_tag_characters) {
        return strtr($str, html_entities());
    }
    $entities = html_entities();
    unset($entities['<'], $entities['>'], $entities['"'], $entities["/"]);
    return strtr($str, $entities);
}
Example #6
0
function html_entities($str)
{
    if (is_array($str)) {
        foreach ($str as $key => $val) {
            $str[$key] = html_entities($val);
        }
    } else {
        $str = htmlentities($str, ENT_QUOTES | ENT_IGNORE, "UTF-8");
    }
    return $str;
}
Example #7
0
/**
 * Displays a <select> of the available languages
/**/
function language_select()
{
    echo '<select name="language">';
    foreach (Translate::$Languages as $lang => $details) {
        // Print the option
        echo '<option value="' . html_entities($lang) . '"';
        if ($_SESSION['language'] == $lang) {
            echo ' SELECTED';
        }
        echo '>' . $details[0] . '</option>';
    }
    echo '</select>';
}
Example #8
0
 public function postMarkup($text = null)
 {
     if ($text == null) {
         return false;
     }
     $text = html_entities($text);
     $text = preg_replace('/\\[([a-zA-Z0-9\\/\\.\\-_:\\?,\\=\\s]+)\\]\\((ftp:\\/\\/|irc:\\/\\/|ircs:\\/\\/|http:\\/\\/|https:\\/\\/)([a-zA-Z0-9\\/\\.\\-_:\\?,\\=]+)\\)/i', '<a href="$2$3" target=_new>$1</a>', $text);
     $text = preg_replace('/\\*\\*([a-zA-Z0-9\\/\\.\\-_:\\?,\\=\\s\\)\\(\\*\\&\\^\\!\\@\\#\\$\\%\\^\\+\\=\\`\\~\\{\\}\\[\\]]+)\\*\\*/i', '<strong>$1</strong>', $text);
     $text = preg_replace('/\\-\\-([a-zA-Z0-9\\/\\.\\-_:\\?,\\=\\s\\)\\(\\*\\&\\^\\!\\@\\#\\$\\%\\^\\+\\=\\`\\~\\{\\}\\[\\]]+)\\-\\-/i', '<del>$1</del>', $text);
     $text = preg_replace('/\\`([a-zA-Z0-9\\/\\.\\-_:\\?,\\=\\s\\)\\(\\*\\&\\^\\!\\@\\#\\$\\%\\^\\+\\=\\`\\~\\{\\}\\[\\]]+)\\`/i', '<code>$1</code>', $text);
     $text = preg_replace('/\\~\\~([a-zA-Z0-9\\/\\.\\-_:\\?,\\=\\s\\)\\(\\*\\&\\^\\!\\@\\#\\$\\%\\^\\+\\=\\`\\~\\{\\}\\[\\]]+)\\~\\~/i', '<em>$1<\\em>', $text);
     $text = preg_replace('/\\_\\_([a-zA-Z0-9\\/\\.\\-_:\\?,\\=\\s\\)\\(\\*\\&\\^\\!\\@\\#\\$\\%\\^\\+\\=\\`\\~\\{\\}\\[\\]]+)\\_\\_/i', '<u>$1</u>', $text);
     return $text;
 }
Example #9
0
/**
 * Prints out the host choices for this section.
 **/
function host_choices()
{
    global $Settings_Hosts;
    if (is_array($Settings_Hosts)) {
        $s = '<form id="host_form" name="host_form" action="' . form_action . '" method="post">' . '<select name="settings_host" onchange="$(\'host_form\').submit()">';
        foreach ($Settings_Hosts as $host => $name) {
            $s .= '<option value="' . html_entities($host) . '"';
            if ($host == $_SESSION['settings']['host']) {
                $s .= ' SELECTED';
            }
            $s .= '>' . html_entities($name) . '</option>';
        }
        $s .= '<noscript><input type="submit" value="' . t('Set Host') . '"></noscript>';
        return $s . '</form>';
    } else {
        return $Settings_Hosts;
    }
}
/**
 * phpwcms content management system
 *
 * @author Oliver Georgi <*****@*****.**>
 * @copyright Copyright (c) 2002-2015, Oliver Georgi
 * @license http://opensource.org/licenses/GPL-2.0 GNU GPL-2
 * @link http://www.phpwcms.de
 *
 **/
function shop_url($get = '', $type = 'htmlentities')
{
    $base = MODULE_HREF;
    if (is_array($get) && count($get)) {
        $get = implode('&', $get);
    } elseif (empty($get)) {
        $get = '';
    }
    if ($get) {
        $get = '&' . $get;
    }
    if (empty($type) || $type != 'htmlentities') {
        $base = str_replace('&amp;', '&', MODULE_HREF);
    } else {
        $get = html_entities($get);
    }
    return $base . $get;
}
Example #11
0
function display_errors($leading = '<p align="center">', $trailing = '</p>')
{
    global $Errors, $Warnings;
    // Errors or warnings from a previous page?
    if (@count($_SESSION['WARNINGS'])) {
        foreach ($_SESSION['WARNINGS'] as $warning) {
            $Warnings[] = $warning;
        }
        unset($_SESSION['WARNINGS']);
    }
    // Nothing to show?
    if (empty($Errors) && empty($Warnings)) {
        return;
    }
    // Load the errors
    $js_errstr = implode("\n", array_merge($Errors, $Warnings));
    $errstr = str_replace("\n", "<br />\n", html_entities($js_errstr));
    // Clean up the javascript error string
    $js_errstr = str_replace("\n", "\\n", str_replace('"', '\\"', $js_errstr));
    // Print
    echo <<<EOF
<script language="JavaScript" type="text/javascript">
<!--
on_load.push(display_errors);
function display_errors() { alert("{$js_errstr}"); };
// -->
</script>
<noscript>
{$leading}
<div id="error">
{$errstr}
</div>
{$trailing}
</noscript>
EOF;
}
:</h3>
            <dl class="clearfix">
               <dt><?php 
echo t('Find Day');
?>
:</dt>
               <dd><?php 
day_select($schedule->findday);
?>
</dd>
               <dt><?php 
echo t('Find Time');
?>
:</dt>
               <dd><input type="text" name="findtime" value="<?php 
echo html_entities($schedule->findtime);
?>
" /></dd>
            </dl>
        </div>

        <div class="x-options">
<?php 
require_once tmpl_dir . '_advanced_options.php';
?>
        </div>

        <div id="schedule_submit">
            <input type="submit" class="submit" name="save" value="<?php 
echo $schedule->recordid ? t('Save Schedule') : t('Create Schedule');
?>
is_checked('1', $plugin['data']['shop_pref_terms_format']);
?>
 onchange="enableSubmit();" /></td>
				<td class="f10"><label for="pref_terms_html">HTML</label>&nbsp;</td>
			</tr>
		</table></td>

	</tr>

	<tr>
		<td align="right" class="chatlist tdtop5"><?php 
echo $BLM['shopprod_terms'];
?>
:&nbsp;</td>
		<td><textarea name="pref_terms" id="pref_terms" class="v12 width375" onchange="enableSubmit();" rows="10"><?php 
echo $plugin['data']['shop_pref_terms_format'] ? html_entities($plugin['data']['shop_pref_terms']) : html_specialchars($plugin['data']['shop_pref_terms']);
?>
</textarea></td>
	</tr>

<tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>

	<tr>
		<td align="right" class="chatlist tdtop3"><?php 
echo $BLM['shopprod_api'];
?>
:&nbsp;</td>
		<td><table summary="" cellpadding="0" cellspacing="0" border="0">
			<tr>
				<td><input type="checkbox" name="pref_api_access" id="pref_api_access" value="1"<?php 
is_checked('1', $plugin['data']['shop_pref_api_access']);
<?php

if (!defined('BASEPATH')) {
    die('You are not allowed to access this page');
}
if ($_SESSION['member'] == true) {
    //if session member
    if ($_POST['submit']) {
        extract(html_entities($_POST));
        $nominal = str_replace(",", "", $nominal);
        $picture = "";
        $files = $_FILES['upload']['name'];
        if ($files != "") {
            $source = $_FILES['upload']['tmp_name'];
            $ext = end(explode(".", $files));
            $picture = "asset/upload/" . md5(time()) . "." . $ext;
            move_uploaded_file($source, $picture);
        }
        $total = str_replace(",", "", $total);
        $Qry = "INSERT INTO konfirmasi (order_id, member_id, bank_id, nominal, \n\t\t\ttgl_transfer, nama_akun, no_rekening, nama_bank, gambar, `status`) VALUES \n\t\t\t('" . $order_id . "', '" . $_SESSION['id'] . "', '" . $bank_id . "', \n\t\t\t'" . $nominal . "', '" . $tgl_transfer . "', '" . $nama_akun . "', \n\t\t\t'" . $no_rekening . "', '" . $nama_bank . "', '" . $picture . "', '1')";
        $Res = mysql_query($Qry);
        if ($Res) {
            $message = "<div class='success'>Berhasil mengirim konfirmasi pembayaran..</div>";
        } else {
            $message = "<div class='error'>" . mysql_error() . "</div>";
        }
        $_SESSION['msg'] = $message;
        header("Location: index.php?p=confirmpayment");
    }
    ?>
Example #15
0
 /**
  * The "details list" for each program.
  **/
 public function details_list()
 {
     // Start the list, and print the show airtime and title
     $str = "<dl class=\"details_list\">\n" . "\t<dt>" . t('Airtime') . ":</dt>\n" . "\t<dd>" . t('$1 to $2', strftime($_SESSION['time_format'], $this->starttime), strftime($_SESSION['time_format'], $this->endtime)) . "</dd>\n" . "\t<dt>" . t('Channel') . ":</dt>\n" . "\t<dd>" . ($_SESSION["prefer_channum"] ? $this->channel->channum : $this->channel->callsign) . ' - ' . $this->channel->name . "</dd>\n" . "\t<dt>" . t('Title') . ":</dt>\n" . "\t<dd>" . html_entities($this->title) . "</dd>\n";
     // Subtitle
     if (preg_match('/\\S/', $this->subtitle)) {
         $str .= "\t<dt>" . t('Subtitle') . ":</dt>\n" . "\t<dd>" . html_entities($this->subtitle) . "</dd>\n";
     }
     // Description
     if (preg_match('/\\S/', $this->fancy_description)) {
         $str .= "\t<dt>" . t('Description') . ":</dt>\n" . "\t<dd>" . nl2br(html_entities($this->fancy_description)) . "</dd>\n";
     }
     // Original Airdate
     if (!empty($this->airdate)) {
         $str .= "\t<dt>" . t('Original Airdate') . ":</dt>\n" . "\t<dd>" . html_entities($this->airdate) . "</dd>\n";
     }
     // Category
     if (preg_match('/\\S/', $this->category)) {
         $str .= "\t<dt>" . t('Category') . ":</dt>\n" . "\t<dd>" . html_entities($this->category) . "</dd>\n";
     }
     // Will be recorded at some point in the future?
     if (!empty($this->will_record)) {
         $str .= "\t<dt>" . t('Schedule') . ":</dt>\n" . "\t<dd>";
         switch ($this->rectype) {
             case rectype_once:
                 $str .= t('rectype-long: once');
                 break;
             case rectype_daily:
                 $str .= t('rectype-long: daily');
                 break;
             case rectype_always:
                 $str .= t('rectype-long: always');
                 break;
             case rectype_weekly:
                 $str .= t('rectype-long: weekly');
                 break;
             case rectype_findone:
                 $str .= t('rectype-long: findone');
                 break;
             case rectype_override:
                 $str .= t('rectype-long: override');
                 break;
             case rectype_dontrec:
                 $str .= t('rectype-long: dontrec');
                 break;
             default:
                 $str .= t('Unknown');
         }
         $str .= "</dd>\n";
     }
     // Recording Priority
     if ($this->recpriority != null) {
         $str .= "\t<dt>" . t('Recording Priority') . "</dt><dd>" . $this->recpriority . "</dd>\n";
     } elseif ($this->recpriority2 != null) {
         $str .= "\t<dt>" . t('Recording Priority') . "</dt><dd>" . $this->recpriority2 . "</dd>\n";
     }
     // Recording status
     if (!empty($this->recstatus)) {
         $str .= "\t<dt>" . t('Notes') . ":</dt>\n" . "\t<dd>" . $GLOBALS['RecStatus_Reasons'][$this->recstatus] . "</dd>\n";
     }
     // Finish off the table and return
     $str .= "\n</dl>";
     return $str;
 }
Example #16
0
        foreach ($program->jobs_possible as $id => $job) {
            echo '                <li>', '<a href="', root_url, 'tv/detail/', $program->chanid, '/', $program->recstartts, '?job=', $id, '">', $job, "</a></li>";
        }
        echo '            </ul>';
    }
    if (count($program->jobs['queue'])) {
        echo t('Queued jobs'), ':', '            <ul class="-queued">';
        foreach ($program->jobs['queue'] as $job) {
            echo '                <li>', $Jobs[$job['type']], ' (', $Job_Status[$job['status']], ':  ', strftime($_SESSION['date_listing_key'], $job['statustime']), ')<br>', html_entities($job['comment']), '</li>';
        }
        echo '            </ul>';
    }
    if (count($program->jobs['done'])) {
        echo t('Recently completed jobs'), ':', '            <ul class="-done">';
        foreach ($program->jobs['done'] as $job) {
            echo '                <li>', $Jobs[$job['type']], ' (', $Job_Status[$job['status']], ':  ', strftime($_SESSION['date_listing_key'], $job['statustime']), ')<br>', html_entities($job['comment']), '</li>';
        }
        echo '            </ul>';
    }
    ?>
            </div>

        <?php 
    flush();
    $frontends = MythFrontend::findFrontends();
    if (is_array($frontends)) {
        echo '<div class="x-frontends">' . t('Play Recording on Frontend') . ':<ul>';
        foreach ($frontends as $frontend) {
            echo '<li><a onclick="watchShow(\'' . urlencode($frontend->getHost()) . '\', \'' . urlencode($program->chanid) . '\', \'' . urlencode($program->recstartts) . '\');">' . $frontend->getHost() . '</a><br>';
        }
        echo '</ul></div>';
Example #17
0
       <td colspan="5" rowspan="<?php 
        echo count($shows) - $i;
        ?>
"></td>
      <?php 
    }
    ?>
       <td class="center" style="font-weight: bold;"><?php 
    echo $i + 1;
    ?>
</td>
      <?php 
    if (isset($channels[$i])) {
        ?>
       <td><?php 
        echo html_entities($channels[$i]['name']);
        ?>
</td>
       <td class="center"><?php 
        echo $channels[$i]['recorded'];
        ?>
</td>
       <td><?php 
        echo date('F j Y', $channels[$i]['last_recorded']);
        ?>
</td>
      <?php 
    } elseif ($padded == false) {
        $padded = true;
        ?>
       <td colspan="5" rowspan="<?php 
Example #18
0
</tr><tr>
    <th><?php 
echo t('Listing &quot;Jump to&quot;');
?>
&nbsp;</td>
    <td><input type="text" size="24" name="date_listing_jump" value="<?php 
echo html_entities($_SESSION['date_listing_jump']);
?>
"></td>
</tr><tr>
    <th><?php 
echo t('Channel &quot;Jump to&quot;');
?>
&nbsp;</td>
    <td><input type="text" size="24" name="date_channel_jump" value="<?php 
echo html_entities($_SESSION['date_channel_jump']);
?>
"></td>
</tr><tr class="x-sep">
    <th><?php 
echo t('Hour Format');
?>
&nbsp;</td>
    <td><select name="time_format" style="text-align: center"><?php 
foreach (array('%I:%M %p', '%H:%M') as $code) {
    echo "<option value=\"{$code}\"";
    if ($_SESSION['time_format'] == $code) {
        echo ' SELECTED';
    }
    echo '>' . strftime($code, strtotime('9:00 AM')) . ' / ' . strftime($code, strtotime('9:00 PM')) . '</option>';
}
Example #19
0
function getQueryString_htmlentities($key = '', $value = '', $bind = '=')
{
    if ($value !== '') {
        return html_entities(urlencode($key) . $bind . str_replace('%2C', ',', urlencode($value)));
    } elseif (PHPWCMS_ALIAS_WSLASH) {
        return html_entities(str_replace('%2F', '/', urlencode($key)));
    }
    return html_entities(urlencode($key));
}
?>
:</dt>
                <dd><input type="text" class="quantity" name="startoffset" value="<?php 
echo html_entities($schedule->startoffset);
?>
">
                    <?php 
echo t('minutes');
?>
</dd>
                <dt><?php 
echo t('End Late');
?>
:</dt>
                <dd><input type="text" class="quantity" name="endoffset" value="<?php 
echo html_entities($schedule->endoffset);
?>
">
                    <?php 
echo t('minutes');
?>
</dd>
                </fieldset>
            </dl>

<div style="display: none;" id="message-dialog">
   <div id="metadata-message"></div>
   <div class="commands">
     <a onclick="Dialogs.close(); return false;"><?php 
echo t('OK');
?>
Example #21
0
    ?>
][hue]"           id="hue_<?php 
    echo $channel->chanid;
    ?>
" value="<?php 
    echo html_entities($channel->hue);
    ?>
" style="text-align: center" /></td>
    <td><input type="text" size="2"  name="channel[<?php 
    echo $channel->chanid;
    ?>
][recpriority]"   id="recpriority_<?php 
    echo $channel->chanid;
    ?>
" value="<?php 
    echo html_entities($channel->recpriority);
    ?>
" style="text-align: center" /></td>
    <td><input type="checkbox"       name="channel[<?php 
    echo $channel->chanid;
    ?>
][commfree]"      value="1"<?php 
    if (!empty($channel->commmethod) && $channel->commmethod == -2) {
        echo ' CHECKED';
    }
    ?>
 /></td>
    <td><input type="checkbox"       name="channel[<?php 
    echo $channel->chanid;
    ?>
][visible]"       value="1"<?php 
/**
 * Prints a <select> of the various weekdays
/**/
function day_select($day, $name = 'findday')
{
    $days = array(t('Sunday'), t('Monday'), t('Tuesday'), t('Wednesday'), t('Thursday'), t('Friday'), t('Saturday'));
    // Print the list
    echo "<select name=\"{$name}\">";
    foreach ($days as $key => $day) {
        $key++;
        echo "<option value=\"{$key}\"";
        if ($key == $day) {
            echo ' SELECTED';
        }
        echo '>' . html_entities($day) . '</option>';
    }
    echo '</select>';
}
Example #23
0
        echo $show->css_class;
        ?>
"><?php 
        if ($show->hdtv) {
            echo '<span class="hdtv_icon">HD</span>';
        }
        if ($show->starstring) {
            echo '<span class="starstring" style="float: right">' . $show->starstring . '</span>';
        }
        // Print the link to edit this scheduled recording
        echo '<a id="program-' . $show->chanid . '-' . $show->starttime . '"';
        if ($_SESSION["show_popup_info"]) {
            echo ' onmouseover = "currently_hovered_id = this.id; details_delay_timer_id = setTimeout(function () {load_tool_tip(\'program-' . $show->chanid . '-' . $show->starttime . '\',\'' . $show->chanid . '\',\'' . $show->starttime . '\');}, 250);"';
            echo ' onmouseout  = "currently_hovered_id = null; clearTimeout( details_delay_timer_id ); details_delay_timer_id = null;"';
        } else {
            echo ' title="', html_entities(strftime($_SESSION['time_format'], $show->starttime) . ' - ' . strftime($_SESSION['time_format'], $show->endtime) . ' -- ' . $show->title . ($show->subtitle ? ':  ' . $show->subtitle : '')), '"';
        }
        if ($show->recstatus == 'NotListed') {
            echo ' href="', root_url, 'tv/schedules#schedule-', $show->recordid;
        } else {
            echo ' href="', root_url, 'tv/detail/', $urlstr;
        }
        echo '">', $show->title, $show->subtitle ? ':  ' . $show->subtitle : '', '</a>';
        ?>
                </td>
            <?php 
    }
    if ($_SESSION['settings']['screens']['tv']['upcoming recordings']['original airdate'] == 'on') {
        ?>
                <td class="x-originalairdate"><?php 
        echo $show->airdate;
Example #24
0
</tr><tr>
    <td align="right"><?php 
echo t('MythVideo Dir');
?>
:</td>
    <td><input type="text" size="36" name="mythvideo_dir" value="<?php 
echo html_entities(setting('VideoStartupDir', hostname));
?>
"><br />
</tr><tr>
    <td align="right"><?php 
echo t('MythVideo Artwork Dir');
?>
:</td>
    <td><input type="text" size="36" name="video_artwork_dir" value="<?php 
echo html_entities(setting('VideoArtworkDir', hostname));
?>
"><br />
</td>
</tr><tr>
    <td class="command_border_t" align="center"><input type="reset" value="<?php 
echo t('Reset');
?>
"></td>
    <td class="command_border_t" align="center"><input type="submit" name="save" value="<?php 
echo t('Save');
?>
"></td>
</tr>
</table>
Example #25
0
    <colgroup>
        <col class="num"></col>
        <col class="title"></col>
        <col class="count"></col>
        <col class="last_recorded"></col>
    </colgroup>
    <tr>
        <th>#</th>
        <th><?php 
echo t('Name');
?>
</th>
        <th><?php 
echo t('Count');
?>
</th>
        <th><?php 
echo t('Last Recorded');
?>
</th>
    </tr><?php 
foreach ($top_ten_chans as $num => $row) {
    echo "<tr>\n", "        <td>", $num + 1, "</td>\n", "        <td>", html_entities($row['name']), "</td>\n", "        <td>", $row['count'], "</td>\n", "        <td>" . date('F j Y', $row['last_recorded']) . "</td>\n", "    </tr>\n";
}
?>
    </table>

</div>
<?php 
// Print the page footer
require 'modules/_shared/tmpl/' . tmpl . '/footer.php';
Example #26
0
echo strftime($_SESSION['date_statusbar'], time());
?>
                </div>
                <div id="help_text" style="display:none;">
                </div>
            </div>
        </div>
        <?php 
if (Modules::getModule('tv')) {
    ?>
        <div id="search">
            <form action="tv/search" method="get">
                <div id="simple_search">
                    <input type="hidden" name="type" value="q">
                    <input id="search_text" type="text" name="s" size="15" value="<?php 
    echo html_entities($_SESSION['search']['s']);
    ?>
">
                    <input id="search_submit" type="submit" class="submit" name="search" value="<?php 
    echo t('Search');
    ?>
">
                    (<a href="tv/search"><?php 
    echo t('Advanced');
    ?>
</a>)
                </div>
            </form>
        </div>
        <?php 
}
Example #27
0
<?php

/**
 * Welcome page description of the Settings module.
 *
 * @license     GPL
 *
 * @package     MythWeb
 * @subpackage  Settings
 *
 **/
// Open with a div and an image
echo '<div id="info_settings">', '<p>', '<a href="', root_url, Modules::getModuleProperty('settings', 'path'), '">', '<img src="', skin_url, '/img/settings.png" class="module_icon" border="0" />', '<h2>', Modules::getModuleProperty('settings', 'name'), '</h2></a>', '</p>', t('welcome: settings'), '<ul>';
foreach (Modules::getModuleProperty('settings', 'links') as $link => $name) {
    echo '    <li><a href="', root_url, Modules::getModuleProperty('settings', 'path'), '/', $link, '">', html_entities($name), "</a></li>\n";
}
echo '</ul>', "</div>\n";
Example #28
0
/**
 * Prints out a list of program types, along with checkboxes.
/**/
function category_type_list()
{
    foreach (Program::category_types() as $key => $type) {
        $safe_type = html_entities($type);
        echo '<input type="checkbox" name="ctype[]" id="ctype_', $key, '" value="', $safe_type, '"';
        if (in_array($type, $_SESSION['search']['ctype'])) {
            echo ' CHECKED';
        }
        echo '><label for="ctype_', $key, '">', $safe_type, '</label>';
        if ($type == 'movie') {
            echo ': ', movie_star_select('stars_gt'), ' to ', movie_star_select('stars_lt');
        }
        echo '<br>';
    }
}
Example #29
0
     $article_author = $feedimport_result['cnt_object']['author_name'];
 }
 if ($article_summary && $article_content && $article_summary == $article_content) {
     $article_content = '';
 }
 if ($article_content && !$article_summary) {
     $article_summary = $article_content;
     $article_content = '';
 }
 if ($article_summary && $article_summary == strip_tags($article_summary)) {
     $article_summary = plaintext_htmlencode($article_summary);
 } elseif ($article_summary && strpos($article_summary, '<') !== false) {
     $article_summary = preg_replace(array('/<.+?[^>]*>\\s*<\\/.+?>/', '/<.+?[^>]*><\\/.+?>/', '/<.+?[^>]*>' . preg_quote($rssvalue->get_title(), '/') . '<\\/.+?>/', '/<.+?[^>]*>' . preg_quote(html_entities($article_title), '/') . '<\\/.+?>/'), '', $article_summary);
 }
 if ($article_content && strpos($article_content, '<') !== false) {
     $article_content = preg_replace(array('/<.+?[^>]*>\\s*<\\/.+?>/', '/<.+?[^>]*><\\/.+?>/', '/<.+?[^>]*>' . preg_quote($rssvalue->get_title(), '/') . '<\\/.+?>/', '/<.+?[^>]*>' . preg_quote(html_entities($article_title), '/') . '<\\/.+?>/'), '', $article_content);
 }
 $article_categories = $rssvalue->get_categories();
 if (is_array($article_categories) && count($article_categories)) {
     foreach ($article_categories as $key => $cat) {
         if ($cat->term) {
             $article_categories[$key] = $cat->term;
         } else {
             unset($article_categories[$key]);
         }
     }
     $article_categories = implode(', ', $article_categories);
 }
 $feedimport_result['image'] = array('tmpllist' => $feedimport_result['cnt_object']['article_template_list'], 'tmplfull' => $feedimport_result['cnt_object']['article_template_detail'], 'name' => '', 'id' => '', 'caption' => '', 'hash' => '', 'width' => '', 'ext' => '', 'list_usesummary' => 0, 'list_name' => '', 'list_id' => 0, 'list_width' => '', 'list_height' => '', 'list_zoom' => 0, 'list_caption' => '', "list_hash" => '', 'zoom' => 0);
 // Thumbnail
 $article_thumbnail = '';
Example #30
0
function doHtmlEntityPHPCleanUp($string, $charset)
{
    $string = html_entities($string);
    return decode_entities($string);
}