Commit c4b684b6 authored by rossta's avatar rossta

Reformatted all non-third party *.php, *.css, and *.js files using trita.

Trita choked on several complex .css files so I skipped those.
I also skipped all third party code, such as adodb and smarty.
If I accidentally checked in any external library, please let me know.
parent a86639c9
<?php # $Header: /cvsroot/tikiwiki/tiki/article_image.php,v 1.2 2003-01-04 19:34:15 rossta Exp $
<?php
// $Header: /cvsroot/tikiwiki/tiki/article_image.php,v 1.3 2003-08-07 04:33:56 rossta Exp $
// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
# $Header: /cvsroot/tikiwiki/tiki/article_image.php,v 1.3 2003-08-07 04:33:56 rossta Exp $
// application to display an image from the database with
// option to resize the image dynamically creating a thumbnail on the fly.
if(!isset($_REQUEST["id"])) {
die;
if (!isset($_REQUEST["id"])) {
die;
}
include_once('db/tiki-db.php');
include_once('lib/tikilib.php');
include_once ('db/tiki-db.php');
include_once ('lib/tikilib.php');
$tikilib = new Tikilib($dbTiki);
$data = $tikilib->get_article($_REQUEST["id"]);
$type=$data["image_type"];
$type = $data["image_type"];
$data = $data["image_data"];
header("Content-type: $type");
header ("Content-type: $type");
echo $data;
?>
\ No newline at end of file
<?php # $Header: /cvsroot/tikiwiki/tiki/banner_click.php,v 1.4 2003-04-04 21:30:57 lrargerich Exp $
<?php
// $Header: /cvsroot/tikiwiki/tiki/banner_click.php,v 1.5 2003-08-07 04:33:56 rossta Exp $
// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
# $Header: /cvsroot/tikiwiki/tiki/banner_click.php,v 1.5 2003-08-07 04:33:56 rossta Exp $
// Receive URI and id
include_once('db/tiki-db.php');
include_once('lib/tikilib.php');
include_once ('db/tiki-db.php');
include_once ('lib/tikilib.php');
$tikilib = new Tikilib($dbTiki);
include_once('lib/banners/bannerlib.php');
include_once ('lib/banners/bannerlib.php');
if(!isset($bannerlib)) {
$bannerlib = new BannerLib($dbTiki);
if (!isset($bannerlib)) {
$bannerlib = new BannerLib($dbTiki);
}
$bannerlib->add_click($_REQUEST["id"]);
$url = urldecode($_REQUEST["url"]);
header("location: $url");
header ("location: $url");
?>
\ No newline at end of file
<?php # $Header: /cvsroot/tikiwiki/tiki/banner_image.php,v 1.4 2003-04-04 21:30:59 lrargerich Exp $
<?php
// $Header: /cvsroot/tikiwiki/tiki/banner_image.php,v 1.5 2003-08-07 04:33:56 rossta Exp $
// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
# $Header: /cvsroot/tikiwiki/tiki/banner_image.php,v 1.5 2003-08-07 04:33:56 rossta Exp $
// application to display an image from the database with
// option to resize the image dynamically creating a thumbnail on the fly.
if(!isset($_REQUEST["id"])) {
die;
if (!isset($_REQUEST["id"])) {
die;
}
include_once('db/tiki-db.php');
include_once('lib/tikilib.php');
include_once ('db/tiki-db.php');
include_once ('lib/tikilib.php');
$tikilib = new Tikilib($dbTiki);
include_once('lib/banners/bannerlib.php');
if(!isset($bannerlib)) {
$bannerlib = new BannerLib($dbTiki);
include_once ('lib/banners/bannerlib.php');
if (!isset($bannerlib)) {
$bannerlib = new BannerLib($dbTiki);
}
$data = $bannerlib->get_banner($_REQUEST["id"]);
$type=$data["imageType"];
$type = $data["imageType"];
$data = $data["imageData"];
header("Content-type: $type");
header ("Content-type: $type");
echo $data;
?>
\ No newline at end of file
<?php
include_once('lib/categories/categlib.php');
if($feature_categories == 'y') {
$smarty->assign('cat_categorize','n');
if(isset($_REQUEST["cat_categorize"])&&$_REQUEST["cat_categorize"]=='on') {
$smarty->assign('cat_categorize','y');
}
if(isset($_REQUEST["cat_categorize"])&&$_REQUEST["cat_categorize"]=='on') {
$categlib->uncategorize_object($cat_type,$cat_objid);
if(isset($_REQUEST["cat_categories"])) {
foreach($_REQUEST["cat_categories"] as $cat_acat) {
if($cat_acat) {
$catObjectId=$categlib->is_categorized($cat_type,$cat_objid);
if(!$catObjectId) {
// The object is not cateorized
$catObjectId = $categlib->add_categorized_object($cat_type,$cat_objid,$cat_desc,$cat_name,$cat_href);
}
$categlib->categorize($catObjectId,$cat_acat);
}
}
// $Header: /cvsroot/tikiwiki/tiki/categorize.php,v 1.4 2003-08-07 04:33:56 rossta Exp $
// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
include_once ('lib/categories/categlib.php');
if ($feature_categories == 'y') {
$smarty->assign('cat_categorize', 'n');
if (isset($_REQUEST["cat_categorize"]) && $_REQUEST["cat_categorize"] == 'on') {
$smarty->assign('cat_categorize', 'y');
}
if (isset($_REQUEST["cat_categorize"]) && $_REQUEST["cat_categorize"] == 'on') {
$categlib->uncategorize_object($cat_type, $cat_objid);
if (isset($_REQUEST["cat_categories"])) {
foreach ($_REQUEST["cat_categories"] as $cat_acat) {
if ($cat_acat) {
$catObjectId = $categlib->is_categorized($cat_type, $cat_objid);
if (!$catObjectId) {
// The object is not cateorized
$catObjectId = $categlib->add_categorized_object($cat_type, $cat_objid, $cat_desc, $cat_name, $cat_href);
}
$categlib->categorize($catObjectId, $cat_acat);
}
}
}
} else {
$categlib->uncategorize_object($cat_type,$cat_objid);
}
$categories = $categlib->list_all_categories(0,-1,'name_asc','',$cat_type,$cat_objid);
$smarty->assign_by_ref('categories',$categories["data"]);
}
?>
} else {
$categlib->uncategorize_object($cat_type, $cat_objid);
}
$categories = $categlib->list_all_categories(0, -1, 'name_asc', '', $cat_type, $cat_objid);
$smarty->assign_by_ref('categories', $categories["data"]);
}
?>
\ No newline at end of file
<?php # $Header: /cvsroot/tikiwiki/tiki/categorize_list.php,v 1.4 2003-08-01 10:30:44 redflo Exp $
include_once('lib/categories/categlib.php');
if($feature_categories == 'y') {
$smarty->assign('cat_categorize','n');
if(isset($_REQUEST["cat_categorize"])&&$_REQUEST["cat_categorize"]=='on') {
$smarty->assign('cat_categorize','y');
}
$categories = $categlib->list_all_categories(0,-1,'name_asc','',$cat_type,$cat_objid);
if(isset($_REQUEST["cat_categories"])&&isset($_REQUEST["cat_categorize"])&&$_REQUEST["cat_categorize"]=='on') {
for($i=0;$i<count($categories["data"]);$i++) {
if(in_array($categories["data"][$i]["categId"],$_REQUEST["cat_categories"])) {
$categories["data"][$i]["incat"]='y';
} else {
$categories["data"][$i]["incat"]='n';
}
}
}
$smarty->assign_by_ref('categories',$categories["data"]);
<?php
// $Header: /cvsroot/tikiwiki/tiki/categorize_list.php,v 1.5 2003-08-07 04:33:56 rossta Exp $
// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
# $Header: /cvsroot/tikiwiki/tiki/categorize_list.php,v 1.5 2003-08-07 04:33:56 rossta Exp $
include_once ('lib/categories/categlib.php');
if ($feature_categories == 'y') {
$smarty->assign('cat_categorize', 'n');
if (isset($_REQUEST["cat_categorize"]) && $_REQUEST["cat_categorize"] == 'on') {
$smarty->assign('cat_categorize', 'y');
}
$categories = $categlib->list_all_categories(0, -1, 'name_asc', '', $cat_type, $cat_objid);
if (isset($_REQUEST["cat_categories"]) && isset($_REQUEST["cat_categorize"]) && $_REQUEST["cat_categorize"] == 'on') {
for ($i = 0; $i < count($categories["data"]); $i++) {
if (in_array($categories["data"][$i]["categId"], $_REQUEST["cat_categories"])) {
$categories["data"][$i]["incat"] = 'y';
} else {
$categories["data"][$i]["incat"] = 'n';
}
}
}
$smarty->assign_by_ref('categories', $categories["data"]);
// check if this page is categorized
if ($categlib->is_categorized($cat_type,$cat_objid)) {
if ($categlib->is_categorized($cat_type, $cat_objid)) {
$cat_categorize = 'y';
} else {
$cat_categorize = 'n';
}
$smarty->assign('cat_categorize',$cat_categorize);
$smarty->assign('cat_categorize', $cat_categorize);
}
?>
?>
\ No newline at end of file
This diff is collapsed.
<?php # $Header: /cvsroot/tikiwiki/tiki/commxmlrpc.php,v 1.8 2003-05-04 21:10:32 lrargerich Exp $
<?php
include_once('db/tiki-db.php');
include_once('lib/tikilib.php');
include_once('lib/userslib.php');
include_once("lib/xmlrpc.inc");
include_once("lib/xmlrpcs.inc");
include_once('lib/commcenter/commlib.php');
// $Header: /cvsroot/tikiwiki/tiki/commxmlrpc.php,v 1.9 2003-08-07 04:33:56 rossta Exp $
// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
# $Header: /cvsroot/tikiwiki/tiki/commxmlrpc.php,v 1.9 2003-08-07 04:33:56 rossta Exp $
include_once ('db/tiki-db.php');
include_once ('lib/tikilib.php');
include_once ('lib/userslib.php');
include_once ("lib/xmlrpc.inc");
include_once ("lib/xmlrpcs.inc");
include_once ('lib/commcenter/commlib.php');
$tikilib = new Tikilib($dbTiki);
$userlib = new Userslib($dbTiki);
if($tikilib->get_preference("feature_comm",'n') != 'y') {
die;
if ($tikilib->get_preference("feature_comm", 'n') != 'y') {
die;
}
$map = array (
"sendPage" => array( "function" => "sendPage"),
"sendArticle" => array("function" => "sendArticle")
$map = array(
"sendPage" => array("function" => "sendPage"),
"sendArticle" => array("function" => "sendArticle")
);
$s=new xmlrpc_server( $map );
$s = new xmlrpc_server($map);
/* Validates the user and returns user information */
function sendPage($params) {
// Get the page and store it in received_pages
global $tikilib,$userlib,$commlib;
$pp=$params->getParam(0); $site=$pp->scalarval();
$pp=$params->getParam(1); $username=$pp->scalarval();
$pp=$params->getParam(2); $password=$pp->scalarval();
$pp=$params->getParam(3); $pageName=$pp->scalarval();
$pp=$params->getParam(4); $data=$pp->scalarval();
$pp=$params->getParam(5); $comment=$pp->scalarval();
$pp=$params->getParam(6); $description=$pp->scalarval();
//
if(!$userlib->validate_user($username,$password,'','')) {
return new xmlrpcresp(0, 101, "Invalid username or password");
}
// Verify if the user has tiki_p_sendme_pages
if(!$userlib->user_has_permission($username,'tiki_p_sendme_pages')) {
return new xmlrpcresp(0, 101, "Permissions denied user $username cannot send pages to this site");
}
// Store the page in the tiki_received_pages_table
$data = base64_decode($data);
$commlib->receive_page($pageName,$data,$comment,$site,$username,$description);
return new xmlrpcresp(new xmlrpcval(1,"boolean"));
// Get the page and store it in received_pages
global $tikilib, $userlib, $commlib;
$pp = $params->getParam(0);
$site = $pp->scalarval();
$pp = $params->getParam(1);
$username = $pp->scalarval();
$pp = $params->getParam(2);
$password = $pp->scalarval();
$pp = $params->getParam(3);
$pageName = $pp->scalarval();
$pp = $params->getParam(4);
$data = $pp->scalarval();
$pp = $params->getParam(5);
$comment = $pp->scalarval();
$pp = $params->getParam(6);
$description = $pp->scalarval();
//
if (!$userlib->validate_user($username, $password, '', '')) {
return new xmlrpcresp(0, 101, "Invalid username or password");
}
// Verify if the user has tiki_p_sendme_pages
if (!$userlib->user_has_permission($username, 'tiki_p_sendme_pages')) {
return new xmlrpcresp(0, 101, "Permissions denied user $username cannot send pages to this site");
}
// Store the page in the tiki_received_pages_table
$data = base64_decode($data);
$commlib->receive_page($pageName, $data, $comment, $site, $username, $description);
return new xmlrpcresp(new xmlrpcval(1, "boolean"));
}
function sendArticle($params) {
// Get the page and store it in received_pages
global $tikilib,$userlib,$commlib;
$pp=$params->getParam(0); $site=$pp->scalarval();
$pp=$params->getParam(1); $username=$pp->scalarval();
$pp=$params->getParam(2); $password=$pp->scalarval();
$pp=$params->getParam(3); $title=$pp->scalarval();
$pp=$params->getParam(4); $authorName=$pp->scalarval();
$pp=$params->getParam(5); $size=$pp->scalarval();
$pp=$params->getParam(6); $use_image=$pp->scalarval();
$pp=$params->getParam(7); $image_name=$pp->scalarval();
$pp=$params->getParam(8); $image_type=$pp->scalarval();
$pp=$params->getParam(9); $image_size=$pp->scalarval();
$pp=$params->getParam(10);$image_x =$pp->scalarval();
$pp=$params->getParam(11);$image_y =$pp->scalarval();
$pp=$params->getParam(12);$image_data =$pp->scalarval();
$pp=$params->getParam(13);$publishDate =$pp->scalarval();
$pp=$params->getParam(14);$created =$pp->scalarval();
$pp=$params->getParam(15);$heading =$pp->scalarval();
$pp=$params->getParam(16);$body =$pp->scalarval();
$pp=$params->getParam(17);$hash =$pp->scalarval();
$pp=$params->getParam(18);$author =$pp->scalarval();
$pp=$params->getParam(19);$type =$pp->scalarval();
$pp=$params->getParam(20);$rating =$pp->scalarval();
//
if(!$userlib->validate_user($username,$password,'','')) {
return new xmlrpcresp(0, 101, "Invalid username or password");
}
// Verify if the user has tiki_p_sendme_pages
if(!$userlib->user_has_permission($username,'tiki_p_sendme_articles')) {
return new xmlrpcresp(0, 101, "Permissions denied user $username cannot send articles to this site");
}
// Store the page in the tiki_received_pages_table
$title = base64_decode($title);
$authorName = base64_decode($authorName);
$image_data = base64_decode($image_data);
$heading = base64_decode($heading);
$body = base64_decode($body);
$commlib->receive_article($site,$username,$title,$authorName,$size,$use_image,$image_name,$image_type,$image_size,$image_x,$image_y,$image_data,$publishDate,$created,$heading,$body,$hash,$author,$type,$rating);
return new xmlrpcresp(new xmlrpcval(1,"boolean"));
// Get the page and store it in received_pages
global $tikilib, $userlib, $commlib;
$pp = $params->getParam(0);
$site = $pp->scalarval();
$pp = $params->getParam(1);
$username = $pp->scalarval();
$pp = $params->getParam(2);
$password = $pp->scalarval();
$pp = $params->getParam(3);
$title = $pp->scalarval();
$pp = $params->getParam(4);
$authorName = $pp->scalarval();
$pp = $params->getParam(5);
$size = $pp->scalarval();
$pp = $params->getParam(6);
$use_image = $pp->scalarval();
$pp = $params->getParam(7);
$image_name = $pp->scalarval();
$pp = $params->getParam(8);
$image_type = $pp->scalarval();
$pp = $params->getParam(9);
$image_size = $pp->scalarval();
$pp = $params->getParam(10);
$image_x = $pp->scalarval();
$pp = $params->getParam(11);
$image_y = $pp->scalarval();
$pp = $params->getParam(12);
$image_data = $pp->scalarval();
$pp = $params->getParam(13);
$publishDate = $pp->scalarval();
$pp = $params->getParam(14);
$created = $pp->scalarval();
$pp = $params->getParam(15);
$heading = $pp->scalarval();
$pp = $params->getParam(16);
$body = $pp->scalarval();
$pp = $params->getParam(17);
$hash = $pp->scalarval();
$pp = $params->getParam(18);
$author = $pp->scalarval();
$pp = $params->getParam(19);
$type = $pp->scalarval();
$pp = $params->getParam(20);
$rating = $pp->scalarval();
//
if (!$userlib->validate_user($username, $password, '', '')) {
return new xmlrpcresp(0, 101, "Invalid username or password");