Esempio n. 1
0
/**
* Maintenance script to collect video data (local and premium videos) and insert into video_info table
* Note: video data come from embedded premium videos, local videos, and related videos (related videos list and global list)
* Default setting: create video_info table, remove deleted videos (local) and add videos
* @author Liz Lee, Saipetch Kongkatong
*/
function addVideo(&$videoList, $titleName)
{
    global $dryrun, $added, $invalid, $duplicate, $dupInDb;
    $videoInfoHelper = new VideoInfoHelper();
    $videoData = $videoInfoHelper->getVideoDataFromTitle($titleName);
    if (!empty($videoData)) {
        printText($videoData['videoTitle']);
        $titleHash = md5($videoData['videoTitle']);
        if (!in_array($titleHash, $videoList)) {
            $status = true;
            if (!$dryrun) {
                $videoInfo = new VideoInfo($videoData);
                $status = $videoInfo->addVideo();
            }
            if ($status) {
                $added++;
                printText("..... ADDED.\n");
            } else {
                $dupInDb++;
                printText("..... ALREADY ADDED TO DB.\n");
            }
            $videoList[] = $titleHash;
        } else {
            $duplicate++;
            printText("..... ALREADY ADDED.\n");
        }
    } else {
        $invalid++;
        printText("{$titleName}..... INVALID.\n");
    }
}
Esempio n. 2
0
function printAny($text)
{
    if (is_array($text)) {
        printArray($text);
    } else {
        printText($text);
    }
}
Esempio n. 3
0
/**
 * add data to video
 * @param array $row
 * @param array $fields
 * @param array $video
 * @return array $video
 */
function addDataToVideo($row, $fields, $video = array())
{
    foreach ($fields as $key => $value) {
        $data = empty($row[$value]) ? '' : $row[$value];
        $video[] = $data;
        printText("\t{$key}: {$data}\n");
    }
    return $video;
}
Esempio n. 4
0
**/
/* define the page class */
$pageClass = "simm";
/* pull in the menu */
if (isset($sessionCrewid)) {
    include_once 'skins/' . $sessionDisplaySkin . '/menu.php';
} else {
    include_once 'skins/' . $skin . '/menu.php';
}
?>

<div class="body">
	<span class="fontTitle">Simm Rules</span>
	<?php 
/*
	if the person is logged in and has level 5 access, display an icon
	that will take them to edit the entry
*/
if (isset($sessionCrewid) && in_array("m_messages", $sessionAccess)) {
    echo "&nbsp;&nbsp;&nbsp;&nbsp;";
    echo "<a href='" . $webLocation . "admin.php?page=manage&sub=messages' class='image'>";
    echo "<img src='" . $webLocation . "images/edit.png' alt='Edit' border='0' />";
    echo "</a>";
}
?>
	<br /><br />
	
	<?php 
printText($rules);
?>
</div>
Esempio n. 5
0
File: main.php Progetto: anodyne/sms
            ?>
	
	<span class="fontMedium"><b><?php 
            printText($newsTitle);
            ?>
</b></span><br />
	<span class="fontSmall">
		Posted by <?php 
            printText($author);
            ?>
 on <?php 
            echo dateFormat("long", $newsPosted);
            ?>
<br />
		Category: <?php 
            printText($catName);
            ?>
	</span><br />
	<div style="padding: 1em 0 3em 1em;">
		<?php 
            printText($newsContent);
            ?>
	</div>
	
	<?php 
        }
    }
}
?>
	
</div>
Esempio n. 6
0
File: main.php Progetto: anodyne/sms
				</span><br />
				<span class="fontSmall">
					Posted by <?php 
                printCrewName($newsItems['newsAuthor'], "rank", "link");
                ?>
 on <?php 
                echo dateFormat("long", $newsPosted);
                ?>
<br />
					Category: <?php 
                printText($catName);
                ?>
				</span><br />
				<div style="padding: .5em 0em 2em 1em;">
					<?php 
                printText($text);
                echo " ... <nobr>[ <a href='" . $webLocation . "index.php?page=news&id=" . $newsid . "'>Read More &raquo;</a> ]</nobr>";
                ?>
				</div>
			
			<?php 
            }
            /* close the while loop */
        }
        /* close the count check */
        ?>
		</div>
		<?php 
    }
    ?>
		
Esempio n. 7
0
?>
		</div> <!-- close TWO -->
		
		<div id="three" class="ui-tabs-container ui-tabs-hide">
			<?php 
if (count($missions['completed']) < 1) {
    ?>
				<strong class='orange fontMedium'>No completed missions</strong>
			<?php 
} else {
    ?>
				<?php 
    foreach ($missions['completed'] as $key => $value) {
        echo "<a href='" . $webLocation . "index.php?page=mission&id=" . $value['id'] . "'><strong class='fontMedium'>";
        printText($value['title']);
        echo "</strong></a>";
        if ($usePosting == "y") {
            echo "&nbsp;&nbsp; [ Posts: " . $value['count'] . " ]";
        }
        echo "<div style='padding: 1em 0 2em 1em;'>";
        printText($value['desc']);
        echo "</div>";
    }
    ?>
			<?php 
}
?>
		</div> <!-- close THREE -->
	</div> <!-- close CONTENT -->
	
</div> <!-- Close .body -->
Esempio n. 8
0
				<?php 
    } else {
        ?>
					<table>
						<?php 
        foreach ($mission_array['completed'] as $row) {
            ?>
							
						<form method="post" action="<?php 
            echo $webLocation;
            ?>
admin.php?page=manage&sub=summaries&t=3">
						<tr>
							<td class="tableCellLabel">
								<?php 
            printText($row['title']);
            ?>
								<input type="hidden" name="missionid" value="<?php 
            echo $row['id'];
            ?>
" />
							</td>
							<td>&nbsp;</td>
							<td>
								<textarea name="missionSummary" rows="15" class="wideTextArea"><?php 
            echo stripslashes($row['summary']);
            ?>
</textarea>
							</td>
						</tr>
						<tr>
Esempio n. 9
0
    }
    if ($missionCount == 0) {
        echo "<b>Please create a mission before posting!</b>";
    } else {
        $missions = "SELECT missionid, missionTitle, missionStatus FROM sms_missions WHERE ";
        $missions .= "missionStatus != 'upcoming'";
        $missionsResult = mysql_query($missions);
        echo "<select name='postMission'>";
        while ($missionArray = mysql_fetch_array($missionsResult)) {
            extract($missionArray, EXTR_OVERWRITE);
            echo "<option value='" . $missionid . "'";
            if ($missionStatus == "current") {
                echo " selected ";
            }
            echo ">";
            printText($missionTitle);
            echo "</option>";
        }
        echo "</select>";
    }
    ?>
				</td>
			</tr>
			<tr>
				<td colspan="3" height="10"></td>
			</tr>
			<tr>
				<td class="narrowLabel tableCellLabel">Title</td>
				<td>&nbsp;</td>
				<td><input type="text" class="name" name="postTitle" style="font-weight:bold;" length="100" /></td>
			</tr>
Esempio n. 10
0
						<img src="images/combadge-npc.png" border="0" alt="[ View Bio ]" />
					</a>
				</td>
			</tr>
	
		<?php 
            }
            /* close the NPC for loop */
        }
        /* close the if( $n_num_row ) logic */
        if ($p_open > "0" && $d_type == "playing") {
            ?>
	
			<tr class="open" style="display:none">
				<td width="35%" valign="middle" style="padding-left: 1em;"><?php 
            printText($p_position);
            ?>
</td>
				<td width="15%" valign="middle" align="right">
					<img src="<?php 
            echo $webLocation;
            ?>
images/ranks/<?php 
            echo $rankSet;
            ?>
/blank.png" />
				</td>
				<td width="40%" valign="middle">
					<span class="fontSmall">
						<a href="<?php 
            echo $webLocation;
Esempio n. 11
0
?>

<div class="body">
	<span class="fontTitle">
		Mission Notes - <i><?php 
echo printMissionTitle($notes[0]);
?>
</i>
		
		<?php 
if (in_array("m_missionnotes", $sessionAccess)) {
    ?>
		&nbsp;
		<a href="<?php 
    echo $webLocation;
    ?>
admin.php?page=manage&sub=missionnotes">
			<img src="<?php 
    echo $webLocation;
    ?>
images/edit.png" border="0" alt="[ Edit ]" />
		</a>
		<?php 
}
?>
		
	</span><br /><br />
	<?php 
printText($notes[1]);
?>
</div>
Esempio n. 12
0
File: jp.php Progetto: anodyne/sms
        $missions = FALSE;
        while ($titleArray = mysql_fetch_array($missionTitleResult)) {
            extract($titleArray, EXTR_OVERWRITE);
            $missions[] = array('id' => $missionid, 'title' => $missionTitle);
        }
        if (count($missions) == 0) {
            echo "<b>You must <a href='" . $webLocation . "admin.php?page=manage&sub=missions'>create a mission</a> before posting!</b>";
        } elseif (count($missions) > 1) {
            echo "<select name='postMission'>";
            foreach ($missions as $k => $v) {
                echo "<option value='" . $v['id'] . "'>" . $v['title'] . "</option>";
            }
            echo "</select>";
        } else {
            echo "<a href='" . $webLocation . "index.php?page=mission&id=" . $missions[0]['id'] . "'>";
            printText($missions[0]['title']);
            echo "</a>";
            echo "<input type='hidden' name='postMission' value='" . $missions[0]['id'] . "' />";
        }
        ?>
				</td>
			</tr>
			<tr>
				<td class="narrowLabel tableCellLabel">Title</td>
				<td>&nbsp;</td>
				<td><input type="text" class="name" name="postTitle" style="font-weight:bold;" length="100" /></td>
			</tr>
			<tr>
				<td class="narrowLabel tableCellLabel">Location</td>
				<td>&nbsp;</td>
				<td><input type="text" class="name" name="postLocation" style="font-weight:bold;" length="100" /></td>
Esempio n. 13
0
	<h3><?php 
    printText($pendingArray['dockingShipName'] . " " . $pendingArray['dockingShipRegistry']);
    ?>
</h3>
	<h4><?php 
    printText($pendingArray['dockingShipCO']);
    ?>
</h4>
	
	<div class="overflow">
		<strong>Duration:</strong> <?php 
    printText($pendingArray['dockingDuration']);
    ?>
</strong><br /><br />
		<?php 
    printText($pendingArray['dockingDesc']);
    ?>
	</div>
		
	<form method="post" action="">
		<div>
			<input type="hidden" name="action_id" value="<?php 
    echo $pendingArray['dockid'];
    ?>
" />
			<input type="hidden" name="action_type" value="delete" />
			<input type="hidden" name="action_tab" value="<?php 
    echo $tab_action;
    ?>
" />
	
Esempio n. 14
0
</td>
		</tr>
		<?php 
}
if ($hasFighters == "y") {
    ?>
		<tr>
			<td class="tableCellLabel">Fighters</td>
			<td>&nbsp;</td>
			<td><?php 
    printText($fighters);
    ?>
</td>
		</tr>
		<?php 
}
if ($hasTransports == "y") {
    ?>
		<tr>
			<td class="tableCellLabel">Transports</td>
			<td>&nbsp;</td>
			<td><?php 
    printText($transports);
    ?>
</td>
		</tr>
		<?php 
}
?>
	</table>
</div> <!-- close the div id content tag -->
Esempio n. 15
0
File: simm.php Progetto: anodyne/sms
    echo "&nbsp;&nbsp;&nbsp;&nbsp;";
    echo "<a href='" . $webLocation . "admin.php?page=manage&sub=messages' class='image'>";
    echo "<img src='" . $webLocation . "images/edit.png' alt='Edit' border='0' />";
    echo "</a>";
}
?>
	<br /><br />
	
	<?php 
printText($simmMessage);
?>
	<br /><br />
	
	<p>
		<b><?php 
printText($co);
?>
<br />
		Commanding Officer, <?php 
printText($shipPrefix . " " . $shipName);
?>
<br />
		<?php 
if ($tfMember == "y") {
    echo $tfName . ", ";
}
echo $fleet;
?>
</b>
	</p>
</div>
Esempio n. 16
0
" + "\n";
                receipt += "<?php 
                }
                ?>
";
                receipt += "<?php 
                echo printLine(lang("total_tax_amount") . ":" . $this->sma->formatMoney($inv->product_tax));
                ?>
" + "\n";
                <?php 
            }
        }
        ?>
                receipt += "\x1B\x61\x31";
                receipt += "\n" + "<?php 
        echo $biller->invoice_footer ? printText(str_replace(array('\\n', '\\r'), ' ', $this->sma->decode_html($biller->invoice_footer))) : '';
        ?>
" + "\n";
                receipt += "\x1B\x61\x30";
                <?php 
        if (isset($pos_settings->cash_drawer_cose)) {
            ?>
                print(receipt, '', '<?php 
            echo $pos_settings->cash_drawer_cose;
            ?>
');
                <?php 
        } else {
            ?>
                print(receipt, '', '');
                <?php 
Esempio n. 17
0
            case 5:
                echo "red";
                break;
        }
        echo "'>";
        ?>
					<i><?php 
        echo dateFormat("long", $strikeDate);
        ?>
</i> - 
					<?php 
        printCrewName($crewid, "rank", "noLink");
        ?>
 [ Strike #<?php 
        echo $allStrikes['number'];
        ?>
 ]</b> - 
					<?php 
        printText($reason);
        ?>
				</li><br />
				<?php 
    }
    ?>
			</ul>
	</div>

<?php 
} else {
    errorMessage("strike listing");
}
Esempio n. 18
0
    $sessionAccess = explode(",", $_SESSION['sessionAccess']);
}
if (in_array("x_approve_users", $sessionAccess)) {
    include_once '../../framework/functionsGlobal.php';
    include_once '../../framework/functionsUtility.php';
    if (isset($_GET['id']) && is_numeric($_GET['id'])) {
        $id = $_GET['id'];
    }
    /* get the data */
    $getPendingCrew = "SELECT crewid, firstName, lastName, positionid, rankid ";
    $getPendingCrew .= "FROM sms_crew WHERE crewid = {$id} LIMIT 1";
    $getPendingCrewResult = mysql_query($getPendingCrew);
    $pendingArray = mysql_fetch_assoc($getPendingCrewResult);
    ?>
	<h2>Reject Crew Application &ndash; <?php 
    printText($pendingArray['firstName'] . " " . $pendingArray['lastName']);
    ?>
</h2>
	<p>Please specify message you want to be sent to the player regarding their rejection.</p>
	<p>Rejection messages can now use wild cards for dynamic elements. For instance, using the <strong class="yellow">#position#</strong> wild card will insert the position they applied for into the email before it is sent. Available wild cards are: <strong>#ship#</strong>, <strong>#position#</strong>, and <strong>#player#</strong> (character&rsquo;s name).</p>
	
	<form method="post" action="">
		<table>
			<tr>
				<td class="tableCellLabel">Email Message</td>
				<td>&nbsp;</td>
				<td>
					<textarea name="rejectMessage" class="narrowTable" rows="10"><?php 
    echo stripslashes($rejectMessage);
    ?>
</textarea>
Esempio n. 19
0
File: bio.php Progetto: anodyne/sms
                    echo "<option value='" . $rankid . "' style='color:#" . $deptColor . ";'>" . $rankName . "</option>";
                }
            }
            ?>
					</select>
				</td>
			</tr>
			<?php 
        } else {
            ?>
			<tr>
				<td class="tableCellLabel">Rank</td>
				<td>&nbsp;</td>
				<td>
					<b><?php 
            printText($fetchRank['rankName']);
            ?>
</b>
					<span class="fontSmall">
						<br /><a href="#" rel="facebox" myAction="why">Why can&rsquo;t I change this rank?</a>
					</span>
					<input type="hidden" name="rank" value="<?php 
            echo $fetchCrew['rankid'];
            ?>
" />
				</td>
			</tr>
			<?php 
        }
        ?>
			
Esempio n. 20
0
                    if (!empty($value[1])) {
                        ?>
					<br />
					<span class="fontSmall">Awarded: <?php 
                        echo dateFormat('medium2', $value[1]);
                        ?>
</span>
					<?php 
                    }
                    ?>
					</span>
				</td>
				<td width="55%" valign="middle">
					<?php 
                    if (!empty($value[2])) {
                        printText($value[2]);
                    } else {
                        echo "<span class='orange'>No reason given</strong>";
                    }
                    ?>
				</td>
				<td width="15%" align="center">
					<a href="#" rel="facebox" myAward="<?php 
                    echo $key;
                    ?>
" myID="<?php 
                    echo $crew;
                    ?>
" class="delete"><strong>Remove Award</strong></a>
				</td>
			</tr>
Esempio n. 21
0
    echo "<img src='" . $webLocation . "images/edit.png' alt='Edit' border='0' />";
    echo "</a>";
}
?>
	<br /><br />

	<table class="zebra" cellspacing="0" cellpadding="8">
		<?php 
/* pull the number of decks the ship/starbase has from the db */
$getDecks = "SELECT * FROM sms_tour_decks";
$getDecksResult = mysql_query($getDecks);
/* loop through the results and fill the form */
while ($deckFetch = mysql_fetch_assoc($getDecksResult)) {
    extract($deckFetch, EXTR_OVERWRITE);
    ?>
		<tr>
			<td class="tableCellLabel" valign="top">Deck <?php 
    echo $deckFetch['deckid'];
    ?>
</td>
			<td>&nbsp;</td>
			<td><?php 
    printText($deckFetch['deckContent']);
    ?>
</td>
		</tr>
		<?php 
}
?>
	</table>
</div>
Esempio n. 22
0
File: info.php Progetto: anodyne/sms
	
	<?php 
if ($showInfoPositions == "y") {
    ?>
	<span class="fontLarge"><b>Open Positions</b></span><br />
	<ul>
		<?php 
    /* loop through everything until you run out of results */
    while ($fetchPositions = mysql_fetch_array($getPositionsResult)) {
        extract($fetchPositions, EXTR_OVERWRITE);
        if ($fetchPositions[2] > 0) {
            ?>
		<li class="fontNormal"><a href="<?php 
            echo $webLocation;
            ?>
index.php?page=join&position=<?php 
            echo $fetchPositions[0];
            ?>
"><?php 
            printText($fetchPositions[1]);
            ?>
</a></li>
		<?php 
        }
    }
    ?>
	</ul>
	<?php 
}
?>
</div>
Esempio n. 23
0
" alt="<?php 
    echo $fetch['awardName'];
    ?>
" border="0" style="float:left; padding-right:10px;" />
			<?php 
    printText($fetch['awardDesc']);
    ?>
		</h4>
		<div style="clear:both;"></div>
		
		<h3>Recipient: <?php 
    printCrewName($crew, 'rank', 'noLink');
    ?>
</h3>
		<div class="overflow"><?php 
    printText($awards_raw[$award][2]);
    ?>
</div>
		
		<p></p>
		
		<div>
			<input type="hidden" name="action_award" value="<?php 
    echo $award;
    ?>
" />
			<input type="hidden" name="action_crew" value="<?php 
    echo $crew;
    ?>
" />
			<input type="hidden" name="action_type" value="remove" />
Esempio n. 24
0
			<tr>
				<td class="hudLabel">Character</td>
				<td></td>
				<td><?php 
    printCrewName($pendingArray['crewid'], 'rank', 'noLink');
    ?>
</td>
			</tr>
			<tr>
				<td colspan="3" height="10"></td>
			</tr>
			<tr>
				<td class="hudLabel">Position</td>
				<td></td>
				<td><?php 
    printText($pendingArray['positionName']);
    ?>
</td>
			</tr>
			<tr>
				<td colspan="3" height="10"></td>
			</tr>
			<tr>
				<td class="hudLabel">Type</td>
				<td></td>
				<td>
					<input type="radio" id="typeNPC" name="type" value="npc" /> <label for="typeNPC">Make An NPC</label><br />
					<input type="radio" id ="typeInactive" name="type" value="inactive" checked="yes" /> <label for="typeInactive">Add to Departed Crew Manifest</label>
				</td>
			</tr>
		</table>
Esempio n. 25
0
							<?php 
            printText($v2['name'] . " " . $v2['registry']);
            ?>
<br />
							<span class="fontSmall">Class: <?php 
            printText($v2['class']);
            ?>
</span>
						</td>
						<td>
							<?php 
            printText($v2['co']);
            ?>
<br />
							<span class="fontSmall"><?php 
            printText($v2['co_email']);
            ?>
</span>
						</td>
						<td align="center">
							<a href="<?php 
            echo $webLocation;
            ?>
index.php?page=dockedships&ship=<?php 
            echo $v2['id'];
            ?>
"><strong>View</strong></a>
						</td>
						<td align="center">
							<a href="#" rel="facebox" myAction="delete" myID="<?php 
            echo $v2['id'];
Esempio n. 26
0
	<p>Are you sure you want to activate this news item?  Once activated this news item will be emailed to the crew.</p>
	
	<hr size="1" width="100%" />
	
	<form method="post" action="">
		<h3><?php 
    printText($pendingArray['newsTitle']);
    ?>
</h3>
		<h4>By <?php 
    printCrewName($pendingArray['newsAuthor'], 'rank', 'noLink');
    ?>
</h4>
		
		<div class="overflow"><?php 
    printText($pendingArray['newsContent']);
    ?>
</div>
		
		<p></p>
		
		<div>
			<input type="hidden" name="action_id" value="<?php 
    echo $pendingArray['newsid'];
    ?>
" />
			<input type="hidden" name="action_category" value="news" />
			<input type="hidden" name="action_type" value="activate" />
		
			<input type="image" src="<?php 
    echo $webLocation;
Esempio n. 27
0
    printText($awardName);
    echo "</b><br />";
    /*
    	if the large version of the award image exists, then show that
    	otherwise, show the small version
    */
    if (file_exists('images/awards/large/' . $awardImage)) {
        $image = $webLocation . 'images/awards/large/' . $awardImage;
    } else {
        $image = $webLocation . 'images/awards/' . $awardImage;
    }
    /* award image */
    echo "<img src='" . $image . "' alt='" . $awardName . "' border='0' />";
    ?>
			</td>
			<td>&nbsp;</td>
			<td><?php 
    printText($awardDesc);
    ?>
</td>
		</tr>
		<tr>
			<td colspan="3" height="5">&nbsp;</td>
		</tr>
		
		<?php 
}
?>
	
	</table> 
</div>
Esempio n. 28
0
		<tr class="<?php 
        echo $rowColor;
        ?>
 fontNormal">
			<td align="center"><?php 
        echo dateFormat("medium", $postPosted);
        ?>
</td> 
			<td align="center"><a href="<?php 
        echo $webLocation;
        ?>
index.php?page=post&id=<?php 
        echo $postid;
        ?>
"><?php 
        printText($postTitle);
        ?>
</a></td> 
			<td align="center"><?php 
        displayAuthors($postid, "link");
        ?>
</a></td> 
		</tr>
	
		<?php 
        $rowCount++;
    }
    ?>
	
	</table> 
	
Esempio n. 29
0
	
	<form method="post" action="">
		<h3><?php 
    printText($pendingArray['dbTitle']);
    ?>
</h3>
		<p><?php 
    printText($pendingArray['dbDesc']);
    ?>
</p>
		
		<?php 
    if ($pendingArray['dbType'] == "entry") {
        ?>
			<div class="overflow"><?php 
        printText($pendingArray['dbContent']);
        ?>
</div>
		<?php 
    } else {
        switch ($pendingArray['dbType']) {
            case 'onsite':
                echo "On-site Entry: <a href='" . $webLocation . $pendingArray['dbURL'] . "'>" . $webLocation . $pendingArray['dbURL'] . "</a>";
                break;
            case 'offsite':
                echo "Off-site Entry: <a href=" . $pendingArray['dbURL'] . "' target='_blank'>" . $pendingArray['dbURL'] . "</a>";
                break;
        }
    }
    ?>
		
Esempio n. 30
0
File: news.php Progetto: anodyne/sms
            ?>
				<table class="zebra" cellpadding="3" cellspacing="0">
					<tr class="fontMedium">
						<th width="34%">Title</th>
						<th width="44%">Author</th>
						<th width="2%"></th>
						<th width="10%"></th>
						<th width="10%"></th>
					</tr>
				
					<?php 
            foreach ($posts_array['pending'] as $value_p) {
                ?>
					<tr class="fontNormal">
						<td><?php 
                printText($value_p['title']);
                ?>
</td>
						<td><?php 
                printCrewName($value_p['author'], 'rank', 'link');
                ?>
</td>
						<td></td>
						<td align="center"><a href="<?php 
                echo $webLocation;
                ?>
index.php?page=news&id=<?php 
                echo $value_p['id'];
                ?>
"><strong>View News</strong></a></td>
						<td align="center"><a href="<?php