Esempio n. 1
0
<table border="0" width="100%" style="margin: 0 0 10px 0;">
<tr>
   <td valign="top" width="50%">
      <?php 
explanation('Watch These Videos...', 'If you\'re new to this app, watch these videos.');
?>
      <div style="margin-left: 20px; margin-right: 20px;">
         <a href="http://screenr.com/62g" target="_blank">Uploading a Song From Your Computer to the Application</a><br />
         <a href="http://screenr.com/o2g" target="_blank">Adding the Player as a Box or Tab to Your Profile</a><br />
         <a href="http://screenr.com/Kxg" target="_blank">Using the Application With Your Facebook Page</a>
      </div>
   </td>

   <td valign="top" width="50%">
      <?php 
explanation('<fb:intl>Read the FAQ...</fb:intl>', 'Most questions asked usually linger around here.');
?>
      <?php 
$faq_db = $db->Raw("SELECT * FROM `faq`");
?>
      <?php 
foreach ($faq_db as $entry) {
    ?>
	      <div style="margin-left: 20px;"><a href="#" clicktotoggle="faq_<?php 
    echo $entry['id'];
    ?>
"><fb:intl><?php 
    echo $entry['question'];
    ?>
</fb:intl></a></div>
	      <div id="faq_<?php 
Esempio n. 2
0
function birthYearExplanation($bday, $name, $gender)
{
    $bdaySign = signFromBday($bday);
    $elementName = startElementFromBday($bday);
    $linearName = linearHangul($name, True);
    //print_r($linearName);
    $explanations = [];
    $steps = ["ITSELF", "PREV", "POINTEDBY", "POINT", "NEXT"];
    foreach ($steps as $step) {
        $element = elementGetObj($elementName, $step);
        //print_r($element->hangul);
        $hangulCandidates = $element->hangul;
        // If there's no explanation for this hangul
        if (count(array_intersect($hangulCandidates, $linearName)) == 0) {
            $msg = explanation($step, $gender, NULL, NULL, NULL, True);
            array_push($explanations, $msg);
            continue;
        }
        foreach ($hangulCandidates as $value) {
            for ($i = 0; $i < count($linearName); $i++) {
                if ($linearName[$i] == $value) {
                    //echo " > step: $step value: $value nameChar: $nameChar ";
                    $nameChar = hangulAtIndex($name, $i);
                    $nameSign = signFromHangul($nameChar);
                    //echo "nameSign: $nameSign";
                    $isGood = isGoodExplanation($linearName, $i, $element);
                    $msg = explanation($step, $gender, $bdaySign, $nameSign, $isGood);
                    //echo "msg: $msg";
                    //print_r($msg);
                    array_push($explanations, $msg);
                }
            }
        }
    }
    return $explanations;
}
Esempio n. 3
0
    if (isset($error)) {
        ?>
		<?php 
        if ($error == 'missing_information') {
            ?>
			<?php 
            error('Not Enough Information', 'I need ALL of the boxes filled below.');
            ?>
		<?php 
        }
        ?>
	<?php 
    } else {
        ?>
		<?php 
        explanation('Song Information (ID3)', 'Here is what I got from what you uploaded, but I\'m not sure if it is right. Do me a favor and check it over and press sumbit when you\'re done.');
        ?>

		<?php 
        $temporary_information = $db->Raw("SELECT `title`,`artist`,`filesize`,`sample_rate`,`fileformat`,`playtime` FROM `userdb_temporary` WHERE `user`='{$user}' LIMIT 1");
        ?>
		
		<?php 
        if (count($temporary_information) == '0') {
            ?>
			<?php 
            if (isset($_GET['fb_page_id'])) {
                error('Error', 'What the?! Something wrong happened, try going <a href="' . $config['fb']['fburl'] . '?action=2&method=upload&fb_page_id=' . $_GET['fb_page_id'] . '">back</a> and try again.');
            } else {
                error('Error', 'An unexpected error has occurred, please go <a href="' . $config['fb']['fburl'] . '?action=2&method=upload">back</a> and try again.');
            }
Esempio n. 4
0
                ?>
		<?php 
            } elseif (!link_available($link)) {
                ?>
			<?php 
                if (isset($_GET['fb_page_id'])) {
                    redirect('index.php?tab=index&error=' . urlencode($error_msgs['invalid_link']) . '&fb_page_id=' . $_GET['fb_page_id'] . '');
                } else {
                    redirect('index.php?tab=index&error=' . urlencode($error_msgs['invalid_link']) . '');
                }
                ?>
		<?php 
            }
            ?>
		<?php 
            explanation('Input Song Information', 'I need some information about the song before we can continue.');
            ?>
	<?php 
        }
    }
    ?>
	
	<fb:editor action="?tab=index&display=add&method=link&step=3<?php 
    if (isset($_GET['fb_page_id'])) {
        echo '&fb_page_id=' . $_GET['fb_page_id'] . '';
    }
    ?>
" labelwidth="50">
		<fb:editor-text label="Title" name="title" value="" maxlength="100" />
		<fb:editor-text label="Artist" name="artist" value="" maxlength="100" />
		<fb:editor-custom>
Esempio n. 5
0
        $db->Raw("INSERT IGNORE INTO `pages` (`fb_page_id`,`owner`) VALUES ('{$_GET['fb_page_id']}','{$_POST['fb_sig_user']}')");
    }
    // Puts a new user into the database or updates the the time in their user file.
    $db->Raw("INSERT INTO `userdb_users` (`user`,`credit`,`override`,`pro`) VALUES ('{$user}','0','0','0') ON DUPLICATE KEY UPDATE `time`=CURRENT_TIMESTAMP");
    $accepted_tos = $db->Raw("SELECT COUNT(*) FROM `userdb_tos` WHERE `user`='{$user}'");
    if (isset($_GET['accept_tos'])) {
        $db->Raw("INSERT IGNORE INTO `userdb_tos` (`user`) VALUES ('{$user}')");
        // If its already there, we don't have to bother with it.
        if (isset($_GET['fb_page_id'])) {
            redirect('' . $config['fb']['fburl'] . '?fb_page_id=' . $_GET['fb_page_id'] . '&intro');
        } else {
            redirect('' . $config['fb']['fburl'] . '?intro');
        }
        die;
    } elseif ($accepted_tos[0]['COUNT(*)'] == '0') {
        explanation('Terms of Service', 'For legal reasons, you must agree to our terms in order to use the application.');
        include_once 'tos.php';
        ?>
		<fb:editor action="<?php 
        echo $config['fb']['fburl'];
        ?>
?accept_tos<?php 
        if (isset($_GET['fb_page_id'])) {
            echo '&fb_page_id=' . $_GET['fb_page_id'] . '';
        }
        ?>
" labelwidth="0">
			<fb:editor-buttonset>
				<fb:editor-button value="Agree"/>
			</fb:editor-buttonset>
		</fb:editor>