Esempio n. 1
0
<?php

/**
 * 迷你同学录 (http://mini_class.piscdong.com/)
 * (c)PiscDong studio (http://www.piscdong.com/)
 *
 * 程序完全免费,请保留这段代码。
 * 请勿出售本程序或其修改版,请勿利用本程序或其修改版进行任何商业活动。
 */
session_start();
require_once 'config.php';
require_once 'function.php';
$u = './';
$c_log = chklog();
if ($c_log) {
    $u = './?m=profile&t=sync&n=instagram';
} else {
    $u = './?m=login&t=instagram';
}
if ($config['is_instagram'] > 0 && $config['instagram_key'] != '' && $config['instagram_se'] != '') {
    if (isset($_GET['code']) && trim($_GET['code']) != '') {
        require_once 'lib/instagram.php';
        $io = new instagramPHP($config['instagram_key'], $config['instagram_se']);
        $result = $io->access_token($config['site_url'] . 'instagram_callback.php', $_GET['code']);
    }
    if (isset($result['access_token']) && $result['access_token'] != '') {
        $s_t = $result['access_token'];
        $s_id = $ia['user']['id'];
        if ($c_log) {
            $ar = getainfo($_SESSION[$config['u_hash']], 'id, name');
            $d_db = sprintf('delete from %s where s_id=%s and aid<>%s and name=%s', $dbprefix . 'm_sync', SQLString($s_id, 'text'), $ar['id'], SQLString('instagram', 'text'));
Esempio n. 2
0
<?php

/**
 * 迷你同学录 (http://mini_class.piscdong.com/)
 * (c)PiscDong studio (http://www.piscdong.com/)
 *
 * 程序完全免费,请保留这段代码。
 * 请勿出售本程序或其修改版,请勿利用本程序或其修改版进行任何商业活动。
 */
session_start();
require_once 'config.php';
require_once 'function.php';
$f = 'sync_p.php';
if (chklog()) {
    $s_dbt = sprintf('select id, content, sync_p from %s where aid=%s and length(sync_p)>0', $dbprefix . 'topic', $_SESSION[$config['u_hash']]);
    $q_dbt = mysql_query($s_dbt) or die('');
    $r_dbt = mysql_fetch_assoc($q_dbt);
    if (mysql_num_rows($q_dbt) > 0) {
        do {
            $ucontent = gbookencode($r_dbt['content'], 1);
            $ucontent = strip_tags($ucontent);
            if ($ucontent != '') {
                $a[] = array($ucontent, $r_dbt['sync_p'], $r_dbt['id'], 'topic');
            }
        } while ($r_dbt = mysql_fetch_assoc($q_dbt));
    }
    mysql_free_result($q_dbt);
    if (!isset($a)) {
        $s_dbr = sprintf('select id, content, sync_p from %s where aid=%s and length(sync_p)>0', $dbprefix . 'pcomment', $_SESSION[$config['u_hash']]);
        $q_dbr = mysql_query($s_dbr) or die('');
        $r_dbr = mysql_fetch_assoc($q_dbr);
Esempio n. 3
0
<?php

/**
 * 迷你同学录 (http://mini_class.piscdong.com/)
 * (c)PiscDong studio (http://www.piscdong.com/)
 *
 * 程序完全免费,请保留这段代码。
 * 请勿出售本程序或其修改版,请勿利用本程序或其修改版进行任何商业活动。
 */
session_start();
require_once 'config.php';
require_once 'function.php';
if (($config['open'] == 0 || chklog()) && $config['slink'] == 0 && chkre()) {
    $i = isset($_GET['id']) && intval($_GET['id']) > 0 ? intval($_GET['id']) : 1;
    $s_dbp = sprintf('select id, url from %s where id=%s and upload>0', $dbprefix . 'photo', $i);
    $q_dbp = mysql_query($s_dbp);
    $r_dbp = mysql_fetch_assoc($q_dbp);
    if (mysql_num_rows($q_dbp) > 0) {
        if (isset($_GET['t']) && $_GET['t'] == 1) {
            $u = 'file/' . getthi($r_dbp['url']);
        }
        if (!isset($u) || !file_exists($u)) {
            $u = 'file/' . $r_dbp['url'];
        }
        $ta = explode('.', $u);
        $t = $ta[count($ta) - 1];
        if (chkuag()) {
            header('Content-Disposition:image/' . $t . '; filename=' . $r_dbp['id'] . '.' . $t);
        }
        header('Content-type: image/' . $t);
        echo join('', file($u));
Esempio n. 4
0
<?php

/**
 * 迷你同学录 (http://mini_class.piscdong.com/)
 * (c)PiscDong studio (http://www.piscdong.com/)
 *
 * 程序完全免费,请保留这段代码。
 * 请勿出售本程序或其修改版,请勿利用本程序或其修改版进行任何商业活动。
 */
session_start();
require_once 'config.php';
require_once 'function.php';
$u = 'images/dphoto.jpg';
if (($config['open'] == 0 || chklog()) && chkre()) {
    $i = isset($_GET['id']) && intval($_GET['id']) > 0 ? intval($_GET['id']) : 1;
    $s_dbu = sprintf('select photo from %s where id=%s', $dbprefix . 'member', $i);
    $q_dbu = mysql_query($s_dbu) or die('');
    $r_dbu = mysql_fetch_assoc($q_dbu);
    if (mysql_num_rows($q_dbu) > 0) {
        if (trim($r_dbu['photo']) != '') {
            $a_pho = explode('|', trim($r_dbu['photo']));
            $t_pho = count($a_pho);
            $k = $config['avator'] == 0 || $t_pho < 2 ? 0 : rand(0, min($config['avator'], $t_pho) - 1);
            $u = $a_pho[$k];
        }
    }
    mysql_free_result($q_dbu);
}
header('Location:' . $u);