Version 2.1.7
This commit is contained in:
1 parent
0eecc172d9
commit
f73f8bff6d
941 files changed
+215301
-103093
No files matched your search
@@ -0,0 +1,162 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Tuesday 18th of July 2006 05:56:00 PM
|
||||
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2005-10-10 14:08:54 +0100 (Mon, 10 Oct 2005) $
|
||||
| > $Revision: 23 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > PORTAL PLUG IN MODULE: POLL
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: Tuesday 2nd August 2005 (12:56)
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* Portal Plug In Module
|
||||
*
|
||||
* This module shows a poll. That's it.
|
||||
*
|
||||
* @package InvisionPowerBoard
|
||||
* @subpackage PortalPlugIn
|
||||
* @author Matt Mecham
|
||||
* @copyright Invision Power Services, Inc.
|
||||
* @version 2.1
|
||||
*/
|
||||
|
||||
/**
|
||||
* Portal Plug In Module
|
||||
*
|
||||
* This module shows a poll. Wooo
|
||||
* Each class name MUST be in the format of:
|
||||
* ppi_{file_name_minus_dot_php}
|
||||
*
|
||||
* @package InvisionPowerBoard
|
||||
* @subpackage PortalPlugIn
|
||||
* @author Matt Mecham
|
||||
* @copyright Invision Power Services, Inc.
|
||||
* @version 2.1
|
||||
*/
|
||||
class ppi_poll
|
||||
{
|
||||
/**
|
||||
* IPS Global object
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $ipsclass;
|
||||
|
||||
/**
|
||||
* Array of portal objects including:
|
||||
* good_forum, bad_forum
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
var $portal_object = array();
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// INIT
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/**
|
||||
* This function must be available always
|
||||
* Add any set up here, such as loading language and skins, etc
|
||||
*
|
||||
*/
|
||||
function init()
|
||||
{
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// MAIN FUNCTION
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/**
|
||||
* Main function
|
||||
*
|
||||
* @return VOID
|
||||
*/
|
||||
function poll_show_poll()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$extra = "";
|
||||
$sql = "";
|
||||
$check = 0;
|
||||
|
||||
//-----------------------------------------
|
||||
// Got a poll?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $this->ipsclass->vars['poll_poll_url'] )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Get the topic ID of the entered URL
|
||||
//-----------------------------------------
|
||||
|
||||
preg_match( "/(\?|&)?(t|showtopic)=(\d+)($|&)/", $this->ipsclass->vars['poll_poll_url'], $match );
|
||||
|
||||
$tid = intval(trim($match[3]));
|
||||
|
||||
if ($tid == "")
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Get topic...
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( ROOT_PATH.'sources/action_public/topics.php' );
|
||||
$this->topic = new topics();
|
||||
$this->topic->ipsclass =& $this->ipsclass;
|
||||
$this->topic->topic_init();
|
||||
|
||||
$this->topic->topic = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*',
|
||||
'from' => 'topics',
|
||||
'where' => "tid=".$tid,
|
||||
) );
|
||||
|
||||
$this->topic->forum = $this->ipsclass->forums->forum_by_id[ $this->topic->topic['forum_id'] ];
|
||||
|
||||
$this->ipsclass->input['f'] = $this->topic->forum['id'];
|
||||
$this->ipsclass->input['t'] = $tid;
|
||||
|
||||
if ( $this->topic->topic['poll_state'] )
|
||||
{
|
||||
$html = $this->topic->parse_poll();
|
||||
|
||||
return $this->ipsclass->compiled_templates['skin_portal']->tmpl_poll_wrapper( $html, $tid );
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user