$thumb = $_POST['thumb'];
include_once XOOPS_ROOT_PATH . '/class/uploader.php';
$allowed_mimetypes = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png');
$maxfilesize = '200000';
$maxfilewidth = '500';
$maxfileheight = '500';
$uploader = new XoopsMediaUploader(XOOPS_ROOT_PATH . "/modules/news/uploads", $allowed_mimetypes, $maxfilesize, $maxfilewidth, $maxfileheight);
if ($uploader->fetchMedia($_POST["xoops_upload_file"][0])) {
if (!$uploader->upload()) {
echo $uploader->getErrors();
} else {
echo '<h4>File uploaded successfully!</h4>';
echo 'Saved as: ' . $uploader->getSavedFileName() . '<br />';
echo 'Full path: ' . $uploader->getSavedDestination();
}
} else {
echo $uploader->getErrors();
}
$scount = count($sarray); $xoopsTpl->assign('story_count', $scount);
$k = 0;
$columns = array();
if($scount>0) { $soccer_storieslist=array();
foreach ($sarray as $storyid => $thisstory) { $soccer_storieslist[]=$thisstory->storyid(); }
$filesperstory = $sfiles->getCountbyStories($soccer_storieslist); foreach ($sarray as $storyid => $thisstory) { $filescount = array_key_exists($thisstory->storyid(),$filesperstory) ? $filesperstory[$thisstory->storyid()] : 0; $story = $thisstory->prepare2show($filescount); // The line below can be used to display a Permanent Link image // $story['title'] .= " <a href='".XOOPS_URL."/modules/soccer/article.php?storyid=".$sarray[$i]->storyid()."'><img src='".XOOPS_URL."/modules/soccer/images/x.gif' alt='Permanent Link' /></a>"; $story['soccer_title'] = $story['title']; $story['title'] = $thisstory->textlink().' : '.$story['title']; $story['topic_title'] = $thisstory->textlink();
$story['topic_color'] = '#'.$myts->displayTarea($thisstory->topic_color); if($firsttitle=='') { $firsttitle=$myts->htmlSpecialChars($thisstory->topic_title()) . ' - ' . $myts->htmlSpecialChars($thisstory->title()); }
$columns[$k][] = $story;
$k++;
if ($k == $column_count) {
$k = 1;