+- remove hard-coded constants (everywhere):
+
- Registration process -> Add welcome texts & move them to one file/node
- Temporary requests node does not exists.
- Nodes are created with bad vector
- (during registration we should generate GnuPG keypair
+ +(during registration we should generate GnuPG keypair
to user_gpg_prv and user_gpg_pub fields in table users) (harvie)
-
- User mail -> can't delete the mails...
Anyway move whole mail handling out of nodes.php (?)
- keep fixing XSS
-- Test & scale logarithmic threading
+- Fix defaukt template (big tables)
- Remove templates from git (they should be only in sql)
$kset->next();
$user_k=$kset->getString('user_k');
+ // XXX hard coded
$senat_id = 876611;
$K_id = 1961061;
$comms = getCommanders($K_id);
<td valign='top' width=50%>
<!-- BANNER PLACE START -->
-<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='468' height='60'><param name='movie' value='http://www.subclub.sk/images/banners/milkshake468x60.swf'><param name='quality' value='high'><embed src='http://www.subclub.sk/images/banners/milkshake468x60.swf' quality=high width='468' height='60' type='application/x-shockwave-flash' pluginspace='http://www.macromedia.com/go/getflashplayer'></embed></object>
+
<!-- BANNER PLACE END -->
<form method='post' action='/id/{$node.node_id}'>
$rss->cache_time = 3600; // one hour
// load some RSS file
+// XXX
if ($rs = $rss->get('http://h-k.sk/scripts/google2rss.php?num=15&q=smallpox')) {
print_r($rs);
<?php
define('DAILY_K',30);
define('REGISTRATION_VOTES',2); //too small so far
+
+// An attempt to remove hard-code constants from code
+define('REGISTRATION_REQUEST_NODE',2091448);
+define('UNVERIFIED_REGISTRATIONS_NODE',1836516);
+
+// 1961061 citizens?
+// 1061495 citizens?
+// 1961070 citizens?
+
+// 791946 ps.php
+// 2228983 ps.php
+
+// 2019721 nodes.php template
+// 2091520 -||-
+
+// F.inc, K.inc
+// $senat_id = 876611;
+// $K_id = 1961061;
+
+// addEvent.inc
+// $params['node_parent'] = 2019771;
+
+// addPlugin.inc
+// $params['node_parent'] = 2019772;
+
+// addTemplate.inc
+// $params['node_parent'] = 2029360;
+
+// configurePoll.inc
+//$params['template_id']="1549834";
+
+// delete.inc
+// $new_parent_id=123456;
+
+// login.inc
+// elseif ($set->getString('header_id') == 2091520) {
+
+// masterize.inc
+// moved to trash
+
+// remove_users.inc
+// a lot of different
+
+// unfriend.inc
+// $q = "update nodes set external_link='', node_parent=123456, node_vector='001234560$node_id' whe
+
+// uprav_zaregistrovanych.inc
+// node_parent=2091448 and k>=3
+
+// verify.inc
+// node_parent=1836516")
+// $q="update nodes set node_parent=2091448,
+// node_vector='0000010120914480$userid' where node_id='$user
+
+// vycisti_registracky.inc
+// node_parent=2091448 and k<=4
+// $q="delete from nodes where node_vector like '020914480$noda%'";
+
+// resource.kyberia.php
+// $params['node_parent'] = 2029360;
+
+// node methodz detto, (add*)
+
+// get_citizen_count.inc
+// nodes.node_id=1961061
+
+// get_k_filtred_nodes
+// $node_id = 2472165;
+
+// get_poll.php
+// template_id='1549834
+
?>
+++ /dev/null
-<?php
-function smarty_function_get_search($params,&$smarty) {
-/*
-$string=escapeshellarg($params['query']);
-$output=`/usr/local/bin/swish-e -d ::: -p node_name node_id node_type node_content k node_views -s node_views -f
-/storage/data/index.swish-e -w node_name=($string) or node_content=($string)`;
-//$output2=`/usr/local/bin/swish-e -d ::: -p node_name node_id node_type node_content k node_views -s node_views -f
-/storage/data/index.swish-e -w '$string'`;
-//echo "/usr/local/bin/swish-e -d ::: -p node_name node_id node_type node_content k node_views -s node_views -f
-/storage/data/index.swish-e -w $string";
-//$output=$output1.$output2;
-$output=str_replace($params['query'],"<span
-class='most_important'>".$params['query']."</span>",$output);
-preg_match_all("/:::(.*?):::(.*?):::(.*?):::(.*?):::(.*?):::(.*?):::(.*?):::(.*?):::(.*?)n/i",$output,$matches);
-foreach($matches[0] as $key => $value) {
-preg_match("/(.*?).xml/i",$matches[2][$key],$ids);
-$id=$ids[1];
-echo "<a href='/id/".$id."'>".$matches[4][$key]."</a>
-(".$matches[6][$key].")<br>";
-echo $matches[7][$key]."<br><br>";
-//echo $matches[5][$key]."<br><br>";
-}
-
-
-global $db, $node;
-
-$q = "SELECT * FROM nodes WHERE node_system_access!='private' AND template_id=3 AND node_name LIKE
-'%".
-str_replace(array("%", "_"), array('%', '_'),
-addslashes($params['query']))."%'";
-$set=$db->query($q);
-while($set->next()) {
-$rec = $set->getRecord();
-echo "<a href='/id/{$rec[node_id]}'>{$rec[node_name]}</a><br>";
-}
-*/
-global $db, $node;
-if (is_numeric($params['offset'])) $offset = $params['offset'];
-else $offset = 0;
-
-if (is_numeric($params['listing_amount'])) $listing_amount = $params['listing_amount'];
-else $listing_amount = 32;
-$query = addslashes($params['query']);
-$q = "select users.login, nodes.* from nodes left join users on
- users.user_id = nodes.node_creator where node_name like '$query%'";
-$set = $db->query($q);
-while ($set->next()) {
- $array[] = $set->getRecord();
-}
-$smarty->assign('get_search_short',$array);
-
-if ($_POST['orderby'] != ("k" || "node_created" || "probability" ||
-"node_views")) $orderby = "k";
-else $orderby=$_POST['orderby'];
-
-$q = "select users.login as login, users.*, nodes.*, nodes.node_creator,
- node_content, match (node_content.node_content) against ('$query') as
- probability from node_content left join users on node_content.node_id = users.user_id
- left join nodes on node_content.node_id = nodes.node_id where
- node_system_access!='private' and match (node_content.node_content)
- against ('$query') order by $orderby desc limit $offset,$listing_amount";
-
-$set = $db->query($q);
-while ($set->next()) {
- $search[] = $set->getRecord();
-}
-
-$smarty->assign('get_search',$search);
-}
-?>
\ No newline at end of file
$array=array_merge($array1,$array2);
- /*
- if ($_SESSION['user_id']==548) {
- print_r($array1);
- echo "LALALA";
- print_r($array2);
- echo "AAAAAA";
- print_r($array);
- }
- */
-
if ($sort_by=='thread') {
$i=0;
for($i=0; $i<count($array); $i++){
}
-// if ($_SESSION['user_id']==548) print_r($array);
-
$smarty->assign('merged',$array);
}
-?>
\ No newline at end of file
+?>
+++ /dev/null
-<?php
-
-function smarty_function_testm($params,&$smarty) {
-
-if ($params['orderby']=='desc') $orderby="desc";
-
-//$external_link=$params['external_link'];
-$external_link='event://';
-if ($params['listing_amount']=='all')
-$listing_amount='23232323232323323';
-else $listing_amount=$params['listing_amount'];
-
-if (empty($params['offset'])) $offset=0;
-else $offset=$params['offset'];
-
-global $db,$node;
-//if (!$params['parent_id']) {
-$parent_id=$node['node_id'];
-//}
-//else $parent_id=$params['parent_id'];
-
-$user_id=$_SESSION['user_id'];
-
-$q="select users.*,nodes.*,node_content.* from nodes left join
-node_content on (node_content.node_id=nodes.node_id) left
-join users on users.user_id=nodes.node_creator where external_link like '$external_link%' LIMIT 0,322323232323232323";
-
-$set=$db->query($q);
-while ($set->next()) $pole[]=$set->getRecord();
-$smarty->assign('testm',$pole);
-}
-?>
\ No newline at end of file