当前位置: 首页>>代码示例>>PHP>>正文


PHP preint_r函数代码示例

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


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

示例1: info

 public static function info($s)
 {
     if (is_object($s)) {
         ob_start();
         preint_r($s);
         $s = ob_get_clean();
     }
     $s = date("Y-m-d H:i:s\t") . $s . "\n";
     file_put_contents(BS_CORE_PATH . "../logs/bitrix24-" . date("Y-m-d") . ".log", $s, FILE_APPEND);
 }
开发者ID:vbushuev,项目名称:bitrix24.dev,代码行数:10,代码来源:Logger.php

示例2: photo_get_action_b

function photo_get_action_b($uri)
{
    echo $uri;
    //$uri = $_SERVER['REQUEST_URI'];
    $result = preg_match('/\\/fotoalbum\\/(\\w+)\\/(\\w+)\\/(\\w+)\\/([\\w\\d]+)?/', $uri, $matches);
    //		preint_r($matches);
    $action['owner_type'] = $matches[1];
    // owner type is [user|group|system]
    $action['owner'] = $matches[2];
    // owner is user name, group name or a special system name
    $action['action'] = $matches[3];
    // action is a view or a post
    $action['item'] = $matches[4];
    // an id identifying a photo or an album
    preint_r($action);
    return $action;
}
开发者ID:Razze,项目名称:hamsterpaj,代码行数:17,代码来源:photo.lib.php

示例3: report_sql_error

function report_sql_error($query, $file = null, $line = null)
{
    echo '<div class="server_message_error"><h2>Såhär skall det ju inte bli, usch!</h2><p>Ett fel på hamsterpaj har inträffat! Utvecklingsansvariga har meddelats om detta, du behöver inte rapportera felet. Vi åtgärdar det snart (om vi kan :P)</p>';
    echo '<h3 class="server_message_collapse_header" id="server_message_collapse_header_sqlerror">Visa felsökningsinformation</h3>' . "\n";
    echo '<div class="server_message_collapsed_information" id="server_message_collapse_information_sqlerror">' . "\n";
    echo '<br />Felsökningsinformation:<br />' . htmlspecialchars(mysql_error());
    echo '<br />Frågan löd:<br /><p>' . htmlspecialchars($query) . '</p>';
    echo $file . ' #' . $line;
    echo '<h1>Backtrace</h1>' . "\n";
    preint_r(debug_backtrace());
    echo '</div></div>' . "\n";
    if (isset($file)) {
        echo '<strong>Logging</strong>';
        //log_to_file('sql_error', LOGLEVEL_ERROR, $file, $line, $query);
        trace('sql_errors', $query . ' in ' . $file . ' on line ' . $line);
    }
}
开发者ID:Rojk,项目名称:hamsterpaj,代码行数:17,代码来源:database.lib.php

示例4: header

<?php

header('Content-type: image/jpeg');
include '../include/core/common.php';
$sql = 'SELECT id FROM login WHERE MD5(id) = "' . $_GET['user_hash'] . '" LIMIT 1;';
$result = mysql_query($sql) or die('Dummer, det här fungerar ju inte.<br />' . mysql_error());
$data = mysql_fetch_assoc($result);
$out = readfile(IMAGE_PATH . 'images/users/full/' . $data['id'] . '.jpg') or die('FISKROJK! BOM-SPÖKENA JAGAR MIG') && preint_r($data);
echo $out;
开发者ID:Rambutan,项目名称:hamsterpaj,代码行数:9,代码来源:age_guess_image.php

示例5: array

<?php

require '../include/core/common.php';
$ui_options['current_menu'] = 'admin';
$ui_options['stylesheets'][] = 'admin_log.css';
$ui_options['menu_path'] = array('admin', 'log_view');
include $hp_includepath . 'admin-functions.php';
require $hp_includepath . 'avataradmin-functions.php';
if (!is_privilegied('use_ghosting_tools')) {
    header('location: /');
    die;
}
ui_top($ui_options);
if (isset($_POST['username'])) {
    preint_r($_POST);
}
$numeric = array_key_exists('numeric', $_POST) == 1;
echo rounded_corners_top();
echo '<h1 style="margin-top: 0px; padding-top: 2px;">Logg över administrativa händelser</h1>';
echo '<h3>Filtrera på valfria fält</h3><br />';
echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">';
echo '<table class="admin_log" >';
echo '	<tr>';
echo '		<td class="event" >Händelse</td>';
echo '		<td class="comment">Info</td>';
echo '		<td class="time">Tidpunkt</td>';
echo '		<td class="admin">Admin</td>';
echo '		<td class="user">Användare</td>';
echo '		<td class="item">Item id</td>';
echo '	</tr>';
echo '	<tr>';
开发者ID:Rambutan,项目名称:hamsterpaj,代码行数:31,代码来源:log_view.php

示例6: films_film_distribute_new

function films_film_distribute_new($film)
{
    preint_r($_SESSION);
    $command = 'mv ' . FILMS_TEMP_PATH . $_SESSION['new_film_temp']['hash'] . '.' . $_SESSION['new_film_temp']['extension'] . ' /storage/www/www.hamsterpaj.net/data/distribute/film/' . $film['handle'] . '.' . $film['extension'];
    log_to_file('films', LOGLEVEL_DEBUG, __FILE__, __LINE__, 'executing command: ' . $command);
    exec($command, $output, $return_value);
    log_to_file('films', LOGLEVEL_DEBUG, __FILE__, __LINE__, 'command: ' . $command . ' returned ' . $return_value, serialize($output));
    distribute_item(array('type' => 'film', 'handle' => $film['handle'], 'extension' => $film['extension']));
}
开发者ID:Razze,项目名称:hamsterpaj,代码行数:9,代码来源:films.lib.php

示例7: array_pop

    $post = array_pop($posts);
    discussion_forum_remove_post(array('post_id' => $_GET['post_id'], 'removal_comment' => $_GET['removal_comment']));
    $message = 'Hej, ditt inlägg i forumet med titeln "%TITLE%" har tagits bort.' . "\n";
    $message .= 'Ordningsvakten som tog bort ditt inlägg heter %REMOVERS_USERNAME% och gjorde följande notering:' . "\n\n";
    $message .= '-----' . "\n";
    $message .= '%REMOVAL_COMMENT%' . "\n";
    $message .= '-----' . "\n\n";
    $message .= 'Här är ditt inlägg:' . "\n";
    $message .= '-----' . "\n";
    $message .= '%CONTENT%' . "\n";
    $message .= '-----' . "\n\n";
    $message .= 'Har du några frågor så ta det med någon ordningsvakt, du hittar sådana i modulen "Inloggade Ordningsvakter" till höger.' . "\n";
    $message .= 'Detta är inte hela världen, men det är kanske bäst att du chillar lite extra i framtiden.' . "\n\n";
    $message .= '/Webmaster';
    $guestbook_message = array('sender' => 2348, 'recipient' => intval($post['author']), 'message' => mysql_real_escape_string(str_replace(array('%TITLE%', '%CONTENT%', '%REMOVAL_COMMENT%', '%REMOVERS_USERNAME%'), array($post['title'], $post['content'], $_GET['removal_comment'], $_SESSION['login']['username']), $message)));
    preint_r($guestbook_message);
    guestbook_insert($guestbook_message);
    log_admin_event('post removed', $post['removal_comment'], $_SESSION['login']['id'], $post['author'], $_GET['post_id']);
    admin_action_count($_SESSION['login']['id'], 'post_removed');
}
if ($_GET['action'] == 'unremove_post' && forum_security(array('action' => 'unremove_post', 'post_id' => $_GET['post_id']))) {
    discussion_forum_remove_post(array('post_id' => $_GET['post_id'], 'mode' => 'unremove'));
}
if ($_GET['action'] == 'vote' && login_checklogin() && is_numeric($_GET['thread_id'])) {
    $query = 'UPDATE forum_read_posts SET has_voted = 1 WHERE thread_id = "' . $_GET['thread_id'] . '" AND user_id = "' . $_SESSION['login']['id'] . '" AND has_voted = 0';
    mysql_query($query);
    if (mysql_affected_rows() == 1) {
        $operand = $_GET['vote'] == 'positive' ? '+' : '-';
        $query = 'UPDATE forum_posts SET score = score ' . $operand . ' 1 WHERE id = "' . $_GET['thread_id'] . '"';
        mysql_query($query) or report_sql_error($query, __FILE__, __LINE__);
    }
开发者ID:Rambutan,项目名称:hamsterpaj,代码行数:31,代码来源:discussion_forum.php

示例8: catch

        }
    }
    // form
    $out .= '<fieldset>' . "\n";
    $out .= '<legend>Användarmeddelande!</legend>' . "\n";
    $out .= '<p>Den här funktionen ger användaren en javascriptruta med ditt meddelande. Detta kräver dock att användaren är inloggad.</p>' . "\n";
    $out .= '<form action="?action=submit" method="post">';
    $out .= '<table class="form">' . "\n";
    $out .= '<tr>' . "\n";
    $out .= '<th><label for="username">Användarnamn <strong>*</strong></label></th>' . "\n";
    $out .= '<td><input type="text" name="username" /></td>' . "\n";
    $out .= '</tr>' . "\n";
    $out .= '<tr>' . "\n";
    $out .= '<th><label for="message">Meddelande <strong>*</strong></label></th>' . "\n";
    $out .= '<td><input type="text" name="message" /></td>' . "\n";
    $out .= '</tr>' . "\n";
    $out .= '</table>' . "\n";
    $out .= '<input type="submit" id="submit" value="Skicka" />' . "\n";
    $out .= '</form>';
    $out .= '</fieldset>' . "\n";
} catch (Exception $error) {
    $options['type'] = 'error';
    $options['title'] = 'Nu blev det fel här';
    $options['message'] = $error->getMessage();
    $options['collapse_link'] = 'Visa felsökningsinformation';
    $options['collapse_information'] = preint_r($error, true);
    $out .= ui_server_message($options);
}
ui_top($ui_options);
echo $out;
ui_bottom();
开发者ID:Rojk,项目名称:hamsterpaj,代码行数:31,代码来源:user_message.php

示例9: foreach

        }
    }
    foreach ($confirmed_recipients as $recipient) {
        $entry['sender'] = $send_from;
        $entry['recipient'] = $recipient;
        $entry['message'] = $_POST['message'];
        $entry['is_private'] = $_POST['is_private'];
        $entry['is_mass_gb'] = true;
        if (!guestbook_insert($entry)) {
            $out .= 'Failade att skicka meddelande till ' . $recipient . '.<br />' . "\n";
        } else {
            $out .= 'Meddelande skickat till ' . $recipient . '<br />';
        }
    }
    preint_r($confirmed_recipients);
    preint_r($entry);
}
$out .= '<fieldset>
	<legend>MassGB-SPAM!</legend>
	<style>
	.recipient_filters li {
		list-style-type:none;
	}
	.mass_gb_left_div {
		border-right: thin solid #BBB;
		padding-right: 15px;
		margin-right: 15px;
		width: 200px;
		float:left;
	}
	.mass_gb_right_div {
开发者ID:Rambutan,项目名称:hamsterpaj,代码行数:31,代码来源:mass_gb.php

示例10: array

<?php

require '../include/core/common.php';
require PATHS_LIBRARIES . 'movie_compability.lib.php';
$ui_options['menu_path'] = array('dev', 'visa_sessionsdata');
ui_top($ui_options);
if (is_privilegied('use_debug_tools')) {
    echo '<h1>Visar sessionsdata</h1>' . "\n";
    preint_r($_SESSION);
} else {
    preint_r(array('fisk' => 'kakor'));
}
ui_bottom();
?>


开发者ID:Rojk,项目名称:hamsterpaj,代码行数:14,代码来源:view_session.php

示例11: elseif

        $out .= 'Det där var tydligen ingen IP-adress.';
    }
} elseif ($action == 'ip2long' && $value_isset) {
    if (ereg('^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}(/[0-9]{1,2}){0,1}$', $value)) {
        $out .= ip2long($value);
    } else {
        $out .= 'Det där var tydligen ingen IP-adress.';
    }
} elseif ($action == 'long2ip' && $value_isset) {
    if (is_numeric($value)) {
        $out .= long2ip($value);
    } else {
        $out .= 'En \'long\' måste bestå av nummer.';
    }
} elseif ($action == 'serialize2preint_r' && $value_isset) {
    $out .= preint_r(unserialize(stripslashes($value)));
} elseif ($action == 'md5' && $value_isset) {
    $out .= md5($value);
} elseif ($action == 'sha1' && $value_isset) {
    $out .= sha1($value);
} elseif ($action == 'hamsterpaj_password_hash' && $value_isset) {
    $out .= sha1(utf8_decode($value) . PASSWORD_SALT);
} elseif ($action == 'timestamp2readable' && $value_isset && is_numeric($value)) {
    $out .= date('Y-m-d H:i:s', $value);
} elseif ($action == 'base64encode' && $value_isset) {
    $out .= base64_encode($value);
} elseif ($action == 'base64decode' && $value_isset) {
    $out .= base64_decode($value);
}
echo utf8_encode($out);
//echo $out;
开发者ID:Razze,项目名称:hamsterpaj,代码行数:31,代码来源:handy.php

示例12: knowledge_database_readable_categories_tree

function knowledge_database_readable_categories_tree($categories_tree, $categories_by_parent = false)
{
    echo 'Fellund...';
    if (!is_array($categories_by_parent)) {
        // It's the first time we iterate...
        $categories_by_parent = $categories_tree;
    }
    preint_r($categories_tree, rand(0, 99999));
    $output .= "\n" . '<ul>' . "\n";
    foreach ($categories_tree as $category) {
        $output .= "\t" . '<li>' . (array_key_exists('is_data', $category) ? 'lolz<a href="#">' . $category['label'] . '</a>' . knowledge_database_readable_categories_tree($category, $categories_by_parent) : 'p3') . '</li>' . "\n";
    }
    $output .= '</ul>' . "\n";
    return $output;
}
开发者ID:Razze,项目名称:hamsterpaj,代码行数:15,代码来源:knowledge_database.lib.php

示例13: preint_r

<?php

require '../include/core/common.php';
require_once PATHS_INCLUDE . 'libraries/posts.php';
require_once PATHS_INCLUDE . 'libraries/markup.php';
//require_once($hp_includepath . '/libraries/markup.php');
//require_once($hp_includepath . '/libraries/games.lib.php');
//require_once($hp_includepath . '/libraries/schedule.lib.php');
//require_once(PATHS_INCLUDE . 'libraries/tips.lib.php');
preint_r($_GET);
preint_r($_SESSION);
开发者ID:Razze,项目名称:hamsterpaj,代码行数:11,代码来源:forum_edit_post.php

示例14: entertain_item_draw

function entertain_item_draw($item, $options)
{
    global $entertain_types;
    entertain_item_viewed($item['id'], $item['entertain_type'], $item['view_count']);
    $output .= '<span class="' . $item['entertain_type'] . '">' . "\n";
    $output .= '<div class="entertain_item">' . "\n";
    // Item title
    $output .= '<h1 class="entertain_header">' . $item['title'] . '</h1>' . "\n";
    /* The entertainment items are displayed in different ways for different types.
    		Games have full width while movie clips, flash films and images are displayed
    		in 3/4 width, whith a few thumbnails on the side.
    	*/
    switch ($item['entertain_type']) {
        case 'software':
        case 'clip':
        case 'flash':
        case 'image':
            $fetch_result = entertain_fetch(array('released' => true, 'entertain_type' => $item['entertain_type'], 'exclude' => array($item['id']), 'limit' => 3, 'order' => 'random'));
            $related_items = $fetch_result['items'];
            $output .= entertain_list($related_items, array('list_style' => 'thumbnails', 'headline' => 'Fler ' . $entertain_types[$item['entertain_type']]['label_plural']));
            break;
        case 'game':
            break;
    }
    // Item rank, counter and release date
    $output .= '<div class="entertain_statistics">' . "\n";
    $output .= '<div class="entertain_rank">' . "\n";
    $output .= rank_draw($item['rank_average'], array('size' => 'medium'));
    $output .= '</div>' . "\n";
    // end entertain_rank
    $output .= '<div class="entertain_view_count">' . "\n";
    $output .= cute_number($item['view_count'] + 1) . ' visningar sedan ' . "\n";
    $output .= date('Y-m-d', $item['release']);
    //fix_time($item['release']);
    $output .= '</div>' . "\n";
    // end entertain_date
    $output .= '</div>' . "\n";
    // end entertain_statistics
    $output .= '<div class="entertain_player" id="entertain_player">' . "\n";
    /* Now we shall display the entertainment item itself. This is done in different ways
    		for different types and also different depending on special properties like
    		use_special_code or trailer_id.
    	*/
    if ($_SESSION['login']['id'] == 87926) {
        preint_r($item);
    }
    //First, we consider a bunch of special cases, that is film trailers, items with their own special html, images and software links
    if ($item['trailer_id'] > 0) {
        $output .= '<!-- Play Networks - Embeddable Flash Player -->' . "\n";
        $output .= '<div id="playnw" class="playnw">' . "\n";
        $output .= '<script src="http://se.player.playnetworks.net/player.php?mid=' . $item['trailer_id'] . '&channel_user_id=4601100020-1&width=474&height=355"></script><br>' . "\n";
        $output .= '</div>' . "\n";
        $output .= '<!-- Play Networks - Embeddable Flash Player -->' . "\n";
    } elseif ($item['use_special_code'] == 1) {
        $output .= stripslashes($item['html']);
    } elseif (strlen($item['link']) > 2 && $item['entertain_type'] == 'image') {
        $server = distribute_server_get(array('item_handle' => $item['handle'], 'type' => $item['entertain_type']));
        $address = 'http://' . $server['address'] . '/distribute/' . $item['entertain_type'] . '/' . $item['handle'] . '.' . $item['extension'];
        $output .= '<a href="' . $item['link'] . '"><img src="' . $address . '" class="entertain_' . $item['entertain_type'] . '" /></a>' . "\n";
    } elseif ($item['entertain_type'] == 'software') {
        $output .= '<button onclick="window.location=\'' . $item['link'] . '\';" class="button_150">Ladda ner</button><br />' . "\n";
        $output .= '<p>Alla filer är givetvis gratis att ladda ner och innehåller inga virus!</p>' . "\n";
    } else {
        $server = distribute_server_get(array('item_handle' => $item['handle'], 'type' => $item['entertain_type']));
        $address = 'http://' . $server['address'] . '/distribute/' . $item['entertain_type'] . '/' . $item['handle'] . '.' . $item['extension'];
        switch ($item['extension']) {
            case 'swf':
                $wrapper = '';
                $output .= '<object type="application/x-shockwave-flash" data="' . $wrapper . $address . '" >
							<param name="movie" value="' . $wrapper . $address . '" /></object>';
                $item['entertain_type'] == 'clip' || $item['entertain_type'] == 'flash' ? event_log_log('jc_ad_after') : '';
                break;
            case 'flv':
                $player_url = '/entertain/flvplayer.swf';
                // On end of J-store campaign, set width to 456 and height to 355 on both places
                $output .= '<div id="player1"><a href="http://www.macromedia.com/go/getflashplayer">Installera Flash Player</a> för att kunna se den här grejen.</div>
						<script type="text/javascript">
						var s1 = new SWFObject("' . $player_url . '","single","466","336","7");
						s1.addParam("allowfullscreen","true");
						s1.addVariable("file","' . $address . '");
						s1.addVariable("image","' . IMAGE_URL . '/entertain/' . $item['handle'] . '.png");
						s1.addVariable("width","466");
						s1.addVariable("height","336");
						s1.write("player1");
						</script>';
                break;
            case 'jpg':
            case 'png':
            case 'gif':
                $server = distribute_server_get(array('item_handle' => $item['handle'], 'type' => $item['entertain_type']));
                $address = 'http://' . $server['address'] . '/distribute/' . $item['entertain_type'] . '/' . $item['handle'] . '.' . $item['extension'];
                $output .= '<img src="' . $address . '" class="entertain_' . $item['entertain_type'] . '" />' . "\n";
        }
    }
    $output .= '<div class="entertain_item_buttons">' . "\n";
    if ($item['entertain_type'] == 'image') {
        $query = 'SELECT id, handle FROM entertain_items WHERE id < "' . $item['id'] . '"';
        $query .= ' AND `release` < ' . time();
        $query .= ' AND entertain_type = "' . $item['entertain_type'] . '"';
        $query .= ' ORDER BY id DESC';
//.........这里部分代码省略.........
开发者ID:KuBe-zz,项目名称:hamsterpaj,代码行数:101,代码来源:entertain.lib.php

示例15: array

		<li><a href="/flash/">Flashfilmer</a></li>
	</ul>
</p>

<h2>Finns det våld, sex eller droger på er underhållningsavdelning?</h2>
<p>
	På Hamsterpaj lägger vi inte upp någonting som vi bedömmer att kan skada ungdomar över 13 år.
	Vi tar avstånd från och lägger aldrig upp brutalt våld i underhållningssyfte. Filmer där folk
	får allvarligare skador än skrubbsår eller blåmärken publicerar vi inte.
</p>
<p>

</p>
<?php 
$parameters['fetch']['handle'] = array('miss_teen_usa', 'tv4__mensvaerk');
preint_r($parameters);
films_fetch_and_list($parameters);
?>

<h2>Så här kan du tipsa om nya roliga grejor!</h2>
<p>
	
</p>


<h2>Vi har sällan licenser eller rättigheter till vårt innehåll</h2>
<p>
	
</p>

<h2>Frågor eller synpunkter?</h2>
开发者ID:Rojk,项目名称:hamsterpaj,代码行数:31,代码来源:noejesavdelning.php


注:本文中的preint_r函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。