From: Roger R. <eps...@us...> - 2002-04-03 00:29:58
|
Update of /cvsroot/pn-modules/PN_PostCalendar/modules/PostCalendar In directory usw-pr-cvs1:/tmp/cvs-serv5996 Modified Files: pnadmin.php pnuser.php Log Message: added Use Topics admin option Index: pnadmin.php =================================================================== RCS file: /cvsroot/pn-modules/PN_PostCalendar/modules/PostCalendar/pnadmin.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** pnadmin.php 3 Apr 2002 00:17:55 -0000 1.14 --- pnadmin.php 3 Apr 2002 00:27:08 -0000 1.15 *************** *** 693,696 **** --- 693,698 ---- $time24hours = pnModGetVar('PostCalendar','time24hours'); $useinternationaldates = pnModGetVar('PostCalendar','useinternationaldates'); + $displaytopics = pnModGetVar('PostCalendar','displaytopics'); + // categories - make this dynamic the next release!!! *************** *** 1126,1153 **** $output->Linebreak(2); ! // topic select ! $output->BoldText(_PC_TOPIC.' '); ! $topics_table = $pntable['topics']; ! $topics_column = &$pntable['topics_column']; ! $sql = "SELECT $topics_column[topicid], $topics_column[topictext], $topics_column[topicname] ! FROM $topics_table ! ORDER BY $topics_column[topictext]"; ! $topiclist = $dbconn->Execute($sql); ! $topic_count = 0; ! $topic_data = array(); ! while(list($topicid,$topictext,$topicname) = $topiclist->fields) { ! if (pnSecAuthAction(0, 'Topics::Topic', "$topicname::$topicid", ACCESS_COMMENT)) { ! $selected = $event_topic == $topicid ? true : false; ! $topic_data[$topic_count]['id'] = pnVarPrepForStore($topicid); ! $topic_data[$topic_count]['selected'] = $selected; ! $topic_data[$topic_count]['name'] = pnVarPrepForDisplay($topictext); } ! $topic_count++; ! $topiclist->MoveNext(); } - $output->FormSelectMultiple('event_topic', $topic_data); - $output->Linebreak(2); $stimes = pnModAPIFunc('PostCalendar','user','buildTimeSelect',array('hselected'=>$event_starttimeh,'mselected'=>$event_starttimem)); --- 1128,1160 ---- $output->Linebreak(2); ! if($displaytopics) { ! // topic select ! $output->BoldText(_PC_TOPIC.' '); ! $topics_table = $pntable['topics']; ! $topics_column = &$pntable['topics_column']; ! $sql = "SELECT $topics_column[topicid], $topics_column[topictext], $topics_column[topicname] ! FROM $topics_table ! ORDER BY $topics_column[topictext]"; ! $topiclist = $dbconn->Execute($sql); ! $topic_count = 0; ! $topic_data = array(); ! while(list($topicid,$topictext,$topicname) = $topiclist->fields) { ! if (pnSecAuthAction(0, 'Topics::Topic', "$topicname::$topicid", ACCESS_COMMENT)) { ! $selected = $event_topic == $topicid ? true : false; ! $topic_data[$topic_count]['id'] = pnVarPrepForStore($topicid); ! $topic_data[$topic_count]['selected'] = $selected; ! $topic_data[$topic_count]['name'] = pnVarPrepForDisplay($topictext); ! } ! $topic_count++; ! $topiclist->MoveNext(); } ! $output->FormSelectMultiple('event_topic', $topic_data); ! $output->Linebreak(2); ! } else { ! if(!isset($topicid)) $topicid=1; ! $output->FormHidden('event_topic',$topicid); } $stimes = pnModAPIFunc('PostCalendar','user','buildTimeSelect',array('hselected'=>$event_starttimeh,'mselected'=>$event_starttimem)); Index: pnuser.php =================================================================== RCS file: /cvsroot/pn-modules/PN_PostCalendar/modules/PostCalendar/pnuser.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** pnuser.php 3 Apr 2002 00:10:55 -0000 1.24 --- pnuser.php 3 Apr 2002 00:27:08 -0000 1.25 *************** *** 191,194 **** --- 191,195 ---- $useinternationaldates = pnModGetVar('PostCalendar','useinternationaldates'); $allowdirectsubmit = pnModGetVar('PostCalendar','allowdirectsubmit'); + $displaytopics = pnModGetVar('PostCalendar','displaytopics'); // categories - make this dynamic the next release!!! *************** *** 523,550 **** $output->Linebreak(2); ! // topic select ! $output->BoldText(_PC_TOPIC.' '); ! $topics_table = $pntable['topics']; ! $topics_column = &$pntable['topics_column']; ! $sql = "SELECT $topics_column[topicid], $topics_column[topictext], $topics_column[topicname] ! FROM $topics_table ! ORDER BY $topics_column[topictext]"; ! $topiclist = $dbconn->Execute($sql); ! $topic_count = 0; ! $topic_data = array(); ! while(list($topicid,$topictext,$topicname) = $topiclist->fields) { ! if (pnSecAuthAction(0, 'Topics::Topic', "$topicname::$topicid", ACCESS_COMMENT)) { ! $selected = $event_topic == $topicid ? true : false; ! $topic_data[$topic_count]['id'] = pnVarPrepForStore($topicid); ! $topic_data[$topic_count]['selected'] = $selected; ! $topic_data[$topic_count]['name'] = pnVarPrepForDisplay($topictext); } ! $topic_count++; ! $topiclist->MoveNext(); } - $output->FormSelectMultiple('event_topic', $topic_data); - $output->Linebreak(2); $stimes = pnModAPIFunc('PostCalendar','user','buildTimeSelect',array('hselected'=>$event_starttimeh,'mselected'=>$event_starttimem)); --- 524,555 ---- $output->Linebreak(2); ! if($displaytopics) { ! // topic select ! $output->BoldText(_PC_TOPIC.' '); ! $topics_table = $pntable['topics']; ! $topics_column = &$pntable['topics_column']; ! $sql = "SELECT $topics_column[topicid], $topics_column[topictext], $topics_column[topicname] ! FROM $topics_table ! ORDER BY $topics_column[topictext]"; ! $topiclist = $dbconn->Execute($sql); ! $topic_count = 0; ! $topic_data = array(); ! while(list($topicid,$topictext,$topicname) = $topiclist->fields) { ! if (pnSecAuthAction(0, 'Topics::Topic', "$topicname::$topicid", ACCESS_COMMENT)) { ! $selected = $event_topic == $topicid ? true : false; ! $topic_data[$topic_count]['id'] = pnVarPrepForStore($topicid); ! $topic_data[$topic_count]['selected'] = $selected; ! $topic_data[$topic_count]['name'] = pnVarPrepForDisplay($topictext); ! } ! $topic_count++; ! $topiclist->MoveNext(); } ! $output->FormSelectMultiple('event_topic', $topic_data); ! $output->Linebreak(2); ! } else { ! $output->FormHidden('event_topic','1'); } $stimes = pnModAPIFunc('PostCalendar','user','buildTimeSelect',array('hselected'=>$event_starttimeh,'mselected'=>$event_starttimem)); |