Exemplo n.º 1
0
function PlanetDestroyMenu()
{
    global $GlobalUser;
    $aktplanet = GetPlanet($GlobalUser['aktplanet']);
    PageHeader("renameplanet");
    echo "<!-- CONTENT AREA -->\n";
    echo "<div id='content'>\n";
    echo "<center>\n\n";
    echo "<h1>Переименовать/покинуть планету</h1>\n";
    echo "<form action=\"index.php?page=renameplanet&session=" . $_GET['session'] . "&pl=" . $aktplanet['planet_id'] . "\" method=\"POST\">\n";
    echo "<input type='hidden' name='page' value='renameplanet'>\n";
    echo "<center>\n\n";
    echo "<table width=\"519\">\n";
    echo "<tr><td class=\"c\" colspan=\"3\">Вопросы на всякий случай</td></tr>\n";
    echo "<tr><th colspan=\"3\">Уничтожение планеты [" . $aktplanet['g'] . ":" . $aktplanet['s'] . ":" . $aktplanet['p'] . "] подтвердить паролем</th></tr>\n";
    echo "<tr><input type=\"hidden\" name=\"deleteid\" value =\"" . $aktplanet['planet_id'] . "\">\n";
    echo "<th>Пароль</th><th><input type=\"password\" name=\"pw\"></th>\n";
    echo "<th><input type=\"submit\" name=\"aktion\" value=\"Удалить планету!\" alt=\"Покинуть колонию\"></th></tr>\n";
    echo "</table>\n</form>\n</center>\n\n";
    echo "<br><br><br><br>\n";
    echo "</center>\n";
    echo "</div>\n";
    echo "<!-- END CONTENT AREA -->\n";
    PageFooter();
    ob_end_flush();
    exit;
}
Exemplo n.º 2
0
                                                    } else {
                                                        if ($_GET['a'] == 17) {
                                                            AllyPage_CircularMessage();
                                                        } else {
                                                            if ($_GET['a'] == 18) {
                                                                AllyPage_Takeover();
                                                            } else {
                                                                AllyPage_Home();
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    } else {
        AllyPage_Home();
    }
}
echo "</center>\n";
echo "</div>\n";
echo "<!-- END CONTENT AREA -->\n";
PageFooter("", $AllianzenError);
ob_end_flush();
Exemplo n.º 3
0
/**
 * Output a table of features per all platforms.
 *
 * @param array $Features
 */
function ViewFeatureTable($Features = array())
{
    global $Supported;
    $Platforms = array_keys($Supported);
    PageHeader();
    echo '<h2 class="FeatureTitle">Data currently supported per platform</h2>';
    echo '<p>Click any platform name for details, or <a href="/" style="text-decoration:underline;">go back</a>.</p>';
    echo '<table class="Features"><thead><tr>';
    // Header row of labels for each platform
    echo '<th><i>Feature</i></th>';
    foreach ($Platforms as $Slug) {
        echo '<th class="Platform"><div><span><a href="?features=1&type=' . $Slug . '">' . $Supported[$Slug]['name'] . '</a></span></div></th>';
    }
    echo '</tr></thead><tbody>';
    // Checklist of features per platform.
    foreach ($Features as $Feature => $Trash) {
        // Name
        echo '<tr><td class="FeatureName">' . FeatureName($Feature) . '</td>';
        // Status per platform.
        foreach ($Platforms as $Platform) {
            echo '<td>' . FeatureStatus($Platform, $Feature, false) . '</td>';
        }
        echo '</tr>';
    }
    echo '</tbody></table>';
    PageFooter();
}
Exemplo n.º 4
0
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
echo "</table>\n";
echo "<br><br><br><br>\n";
echo "</center>\n";
echo "</div>\n";
echo "<!-- END CONTENT AREA -->\n";
if ($AdminMessage || $AdminError) {
    PageFooter($AdminMessage, $AdminError);
} else {
    PageFooter($AdminMessage, $AdminError, false, 0);
}
ob_end_flush();
Exemplo n.º 5
0
        echo "<span id=\"missiles\">" . nicenum($aktplanet["d503"]) . "</span> Межпланетные ракеты  &nbsp;&nbsp;&nbsp;&nbsp;";
    }
    ?>
Дейтерий:  <?php 
    echo nicenum($aktplanet["d"]);
    ?>
&nbsp;&nbsp;&nbsp;&nbsp;<br/><span id='slots'><?php 
    echo $nowfleet;
    ?>
</span>&nbsp;из <?php 
    echo $maxfleet;
    ?>
 слотов находятся в эксплуатации</td>
</tr>
<tr style="display: none;" id="fleetstatusrow"><th colspan="8"><!--<div id="fleetstatus"></div>-->
<table style="font-weight: bold;" width=100% id="fleetstatustable">
<!-- will be filled with content later on while processing ajax replys -->
</table>
</th>
</tr>

<?php 
    echo "</table>\n\n";
}
// Недостаточно дейтерия
echo "<br><br><br><br>\n";
echo "</center>\n";
echo "</div>\n";
echo "<!-- END CONTENT AREA -->\n\n";
PageFooter($GalaxyMessage, $GalaxyError, false, 0);
ob_end_flush();
Exemplo n.º 6
0
    $cons = 0;
    foreach ($fleetmap as $i => $id) {
        $amount = $fleet_obj["ship" . $id];
        if ($amount > 0) {
            $cons += $amount * FleetCons($id, $user['r115'], $user['r117'], $user['r118']) / 10;
        }
    }
    // Заправить флот
    if (key_exists("c" . $c, $_POST)) {
        $hours = abs(intval($_POST["c" . $c]));
    } else {
        $hours = 0;
    }
    if ($deut_avail > 0 && $deut_avail >= $cons * $hours) {
        ProlongQueue($queue['task_id'], $hours * 3600);
        $deut_avail -= $cons * $hours;
    }
    $c++;
}
// Модифицировать ресурсы на планете
$spent = $loaded - $deut_avail;
if ($spent > 0) {
    AdjustResources(0, 0, $spent, $aktplanet['planet_id'], '-');
}
// Сделать редирект на склад альянса
MyGoto("infos", "&gid=34");
echo "</center>\n";
echo "</div>\n";
echo "<!-- END CONTENT AREA -->\n\n";
PageFooter("", $DepotError);
ob_end_flush();
Exemplo n.º 7
0
      <?php 
        if ($GlobalUser['disable']) {
            echo "am: " . date("Y-m-d H:i:s", $GlobalUser['disable_until']);
        }
        ?>
 </th>
  </tr>
  <tr>
   <th colspan=2><input type="submit" value="<?php 
        echo loca("OPTIONS_APPLY");
        ?>
" /></th>

  </tr>
   
 </form>
 </table>

<?php 
    }
}
?>

<br><br><br><br>
</center>
</div>
<!-- END CONTENT AREA -->

<?php 
PageFooter($OptionsMessage, $OptionsError);
ob_end_flush();
Exemplo n.º 8
0
   <tr height="20">
     <th>Время возврата</th><th><?php 
    echo date("D M j G:i:s", $queue['end'] + $flighttime + $hold_time);
    ?>
</th>
    </tr>
   <tr height="20">
     <td class="c" colspan="2">Корабли</td>
   </tr>

<?php 
    // Список кораблей.
    foreach ($fleet as $id => $amount) {
        if ($amount > 0) {
            echo "      <tr height=\"20\">\n";
            echo "     <th width=\"50%\">" . loca("NAME_{$id}") . "</th><th>" . nicenum($amount) . "</th>\n";
            echo "   </tr>\n";
        }
    }
}
?>

   </table>
<br><br><br><br>
</center>
</div>
<!-- END CONTENT AREA -->

<?php 
PageFooter("", $PageError);
ob_end_flush();
Exemplo n.º 9
0
 /**
  * Forum-specific export format
  * @todo Project file size / export time and possibly break into multiple files
  */
 protected function ForumExport($Ex)
 {
     // Begin
     PageHeader();
     $Ex->BeginExport('export ' . date('Y-m-d His') . '.txt.gz', 'vBulletin 3+');
     // Users
     $User_Map = array('UserID' => 'userid', 'Name' => 'username', 'Password' => 'password', 'Email' => 'email', 'InviteUserID' => 'referrerid', 'HourOffset' => 'timezoneoffset', 'CountComments' => 'posts', 'Salt' => 'salt');
     $Ex->ExportTable('User', "select *,\n            DATE_FORMAT(birthday_search,GET_FORMAT(DATE,'ISO')) as DateOfBirth,\n            FROM_UNIXTIME(joindate) as DateFirstVisit,\n            FROM_UNIXTIME(lastvisit) as DateLastActive,\n            FROM_UNIXTIME(joindate) as DateInserted,\n            FROM_UNIXTIME(lastactivity) as DateUpdated\n         from :_user", $User_Map);
     // ":_" will be replace by database prefix
     // Roles
     $Role_Map = array('RoleID' => 'usergroupid', 'Name' => 'title', 'Description' => 'description');
     $Ex->ExportTable('Role', 'select * from :_usergroup', $Role_Map);
     // UserRoles
     $UserRole_Map = array('UserID' => 'userid', 'RoleID' => 'usergroupid');
     $Ex->Query("CREATE TEMPORARY TABLE VbulletinRoles (userid INT UNSIGNED NOT NULL, usergroupid INT UNSIGNED NOT NULL)");
     # Put primary groups into tmp table
     $Ex->Query("insert into VbulletinRoles (userid, usergroupid) select userid, usergroupid from :_user");
     # Put stupid CSV column into tmp table
     $SecondaryRoles = $Ex->Query("select userid, membergroupids from :_user");
     foreach ($SecondaryRoles as $Row) {
         if ($Row['membergroupids'] != '') {
             $Groups = explode(',', $Row['membergroupids']);
             foreach ($Groups as $GroupID) {
                 $Ex->Query("insert into VbulletinRoles (userid, usergroupid) values(" . $Row['userid'] . "," . $GroupID . "");
             }
         }
     }
     # Export from our tmp table and drop
     $Ex->ExportTable('UserRole', 'select userid, usergroupid from VbulletinRoles', $UserRole_Map);
     $Ex->Query("DROP TABLE VbulletinRoles");
     // UserMeta
     $Ex->Query("CREATE TEMPORARY TABLE VbulletinUserMeta (`UserID` INT NOT NULL ,`MetaKey` VARCHAR( 64 ) NOT NULL ,`MetaValue` VARCHAR( 255 ) NOT NULL)");
     # Standard vB user data
     $UserFields = array('usertitle', 'homepage', 'aim', 'icq', 'yahoo', 'msn', 'skype', 'styleid');
     foreach ($UserFields as $Field) {
         $Ex->Query("insert into VbulletinUserMeta (UserID, MetaKey, MetaValue) select userid, '" . $Field . "', " . $Field . " from :_user where " . $Field . "!=''");
     }
     # Dynamic vB user data (userfield)
     $ProfileFields = $Ex->Query("select varname, text from :_phrase where product='vbulletin' and fieldname='cprofilefield' and varname like 'field%_title'");
     foreach ($ProfileFields as $Field) {
         $VbulletinField = str_replace('_title', '', $Field['varname']);
         $MetaKey = preg_replace('/[^0-9a-z_-]/', '', strtolower($Field['text']));
         $Ex->Query("insert into VbulletinUserMeta (UserID, MetaKey, MetaValue) \n            select userid, '" . $MetaKey . "', " . $VbulletinField . " from :_userfield where " . $VbulletinField . "!=''");
     }
     # Export from our tmp table and drop
     $Ex->ExportTable('UserMeta', 'select UserID, MetaKey, MetaValue from VbulletinUserMeta');
     $Ex->Query("DROP TABLE VbulletinUserMeta");
     // Categories
     $Category_Map = array('CategoryID' => 'forumid', 'Description' => 'description', 'Sort' => 'displayorder');
     $Ex->ExportTable('Category', "select forumid, left(title,30) as Name, description, displayorder\n         from :_forum where threadcount > 0", $Category_Map);
     // Discussions
     $Discussion_Map = array('DiscussionID' => 'threadid', 'CategoryID' => 'forumid', 'InsertUserID' => 'postuserid', 'UpdateUserID' => 'postuserid', 'Name' => 'title');
     $Ex->ExportTable('Discussion', "select *, \n            replycount+1 as CountComments, \n            convert(ABS(open-1),char(1)) as Closed, \n            convert(sticky,char(1)) as Announce,\n            FROM_UNIXTIME(t.dateline) as DateInserted,\n            FROM_UNIXTIME(lastpost) as DateUpdated,\n            FROM_UNIXTIME(lastpost) as DateLastComment\n         from :_thread t\n            left join :_deletionlog d ON (d.type='thread' AND d.primaryid=t.threadid)\n         where d.primaryid IS NULL", $Discussion_Map);
     // Comments
     /*$Comment_Map = array(
          'CommentID' => 'postid', 
          'DiscussionID'=> 'threadid', 
          'Body'=> 'pagetext'
       );
       $Ex->ExportTable('Comment', "select *,
             p.userid as InsertUserID,
             p.userid as UpdateUserID,
             FROM_UNIXTIME(p.dateline) as DateInserted,
             FROM_UNIXTIME(p.dateline) as DateUpdated
          from :_post p
             left join :_deletionlog d ON (d.type='post' AND d.primaryid=p.postid)
          where d.primaryid IS NULL", $Comment_Map);
       */
     // UserDiscussion
     $Ex->ExportTable('UserDiscussion', "select userid as UserID, threadid as DiscussionID from :_subscribethread");
     // Activity (3.8+)
     $Activity_Map = array('ActivityUserID' => 'postuserid', 'RegardingUserID' => 'userid', 'Story' => 'pagetext', 'InsertUserID' => 'postuserid');
     $Tables = $Ex->Query("show tables like ':_visitormessage'");
     if (count($Tables) > 0) {
         # Table is present
         $Ex->ExportTable('Activity', "select *, \n\t\t\t   FROM_UNIXTIME(dateline) as DateInserted\n\t\t\tfrom :_visitormessage\n\t\t\twhere state='visible'", $Activity_Map);
     }
     // End
     $Ex->EndExport();
     PageFooter();
 }
Exemplo n.º 10
0
                    } else {
                        if (key_exists('action', $_GET) && $_GET['action'] == 7) {
                            Buddy_Request();
                        } else {
                            if (key_exists('action', $_GET) && $_GET['action'] == 8 && $_GET['buddy_id']) {
                                $buddy_id = intval($_GET['buddy_id']);
                                $buddy = LoadBuddy($buddy_id);
                                if ($buddy['request_from'] == $GlobalUser['player_id']) {
                                    RemoveBuddy($buddy_id);
                                    SendMessage($buddy['request_to'], loca("BUDDY_LIST"), loca("BUDDY_CONFIRM"), va(loca("BUDDY_MSG_DELETED"), $GlobalUser['oname']), 0);
                                }
                                if ($buddy['request_to'] == $GlobalUser['player_id']) {
                                    RemoveBuddy($buddy_id);
                                    SendMessage($buddy['request_from'], loca("BUDDY_LIST"), loca("BUDDY_CONFIRM"), va(loca("BUDDY_MSG_DELETED"), $GlobalUser['oname']), 0);
                                }
                                Buddy_Home();
                            } else {
                                Buddy_Home();
                            }
                        }
                    }
                }
            }
        }
    }
}
echo "</center>\n";
echo "</div>\n";
echo "<!-- END CONTENT AREA -->\n";
PageFooter("", $BuddyError);
ob_end_flush();
Exemplo n.º 11
0
                          <font size=3><b><?php 
    echo $GlobalUser['rate_d'];
    ?>
</b></font>
<?php 
    if ($GlobalUser['trader'] != 3) {
        ?>
                          </a>
<?php 
    }
    ?>
                        </th>           
        </TR>
        
        <tr>
        <th class="c" align="center" colspan=4 ><br>Скупщик поставляет столько, сколько могут вместить ваши хранилища.       <br><br><input type=submit name='trade' value='Обменять!'>
        </th>
        </tr>
    </TABLE>
</form> 
<?php 
}
?>
	<br><br><br><br>
</center>
</div>
<!-- END CONTENT AREA -->

<?php 
PageFooter($TraderMessage, $TraderError);
ob_end_flush();
Exemplo n.º 12
0
/**
 * piv_error prints an error message, does a debug backtrace print out
 * and exits.
 *
 * On the admin pages it will just display the text on the current page and
 * add the page footer (if endpage is equal to 1). On weblog pages it will use
 * the extra page template for the current weblog.
 *
 * @param string $name
 * @param string $message
 * @param boolean $endpage
 */
function piv_error($name, $message, $endpage = 0)
{
    global $db, $Current_weblog, $Weblogs, $Pivot_Vars;
    if (!isset($db)) {
        $db = new db();
    }
    if (!isset($Current_weblog)) {
        reset($Weblogs);
        if (isset($Pivot_Vars['w'])) {
            $Current_weblog = weblog_from_para($Pivot_Vars['w']);
            if (!$Current_weblog) {
                $Current_weblog = key($Weblogs);
            }
        } else {
            $Current_weblog = key($Weblogs);
        }
    }
    debug_printbacktrace();
    $text = "<div class='pivot-error'>\n<h2>{$name}</h2>\n\n" . "<p>{$message}</p>\n</div>\n";
    if ($endpage == 1 || !defined('LIVEPAGE') && !defined('INWEBLOG')) {
        echo $text;
        PageFooter();
        exit;
    }
    // Use the extra template for the current weblog
    if (isset($Weblogs[$Current_weblog]['extra_template']) && $Weblogs[$Current_weblog]['extra_template'] != "") {
        $template_html = load_template($Weblogs[$Current_weblog]['extra_template']);
    } else {
        $template_html = load_template($Weblogs[$Current_weblog]['archive_template']);
    }
    // Match and replace the [[weblog]] tags for the error output
    $template_html = replace_subweblogs_templates($template_html, $text);
    if (!$template_html) {
        ErrorOut("Could not load template file: <i>{$template}</i> [does not exist]");
    } else {
        $output = $template_html;
        $output = parse_step4($output);
    }
    echo $output;
    flush();
    exit;
}
Exemplo n.º 13
0
/**
 * Message: Result of export
 */
function ViewExportResult($msg = '')
{
    PageHeader();
    ?>
   
   
   
   <?php 
    PageFooter();
}
Exemplo n.º 14
0
            echo "</tr>\n\n";
        }
    }
    dbfree($planet);
}
echo "<tr></tr>\n</table>\n</th>\n\n";
if ($GlobalUser['score1'] < 0) {
    $score = 0;
} else {
    $score = nicenum(floor($GlobalUser['score1'] / 1000));
}
// Параметры планеты
echo "<tr><th> " . va(loca("OVERVIEW_DIAM"), nicenum($aktplanet['diameter'])) . "     " . va(loca("OVERVIEW_FIELDS"), $aktplanet['fields'], $aktplanet['maxfields']) . "   </th></tr>\n";
echo "<tr><th> " . va(loca("OVERVIEW_TEMP"), $aktplanet['temp'], $aktplanet['temp'] + 40) . "   \n";
echo "<tr><th> " . va(loca("OVERVIEW_COORD"), "<a href=\"index.php?page=galaxy&galaxy=" . $aktplanet['g'] . "&system=" . $aktplanet['s'] . "&position=" . $aktplanet['p'] . "&session={$session}\" >[" . $aktplanet['g'] . ":" . $aktplanet['s'] . ":" . $aktplanet['p'] . "]</a>") . "\n";
echo "<tr><th> " . va(loca("OVERVIEW_RANK"), $score, "<a href='index.php?page=statistics&session={$session}&start=" . (floor($GlobalUser['place1'] / 100) * 100 + 1) . "'>" . nicenum($GlobalUser['place1']) . "</a>", nicenum($uni['usercount'])) . "     \n";
echo "</table>\n<br><br><br><br><br>\n";
echo "</center>\n";
echo "</div>\n";
echo "<!-- END CONTENT AREA -->\n\n";
if ($GlobalUser['vacation']) {
    $OverviewError = "<center>\nрежим отпуска<br></center>\n";
}
if ($uni['freeze']) {
    $OverviewError .= "<center>\nВселенная поставлена на паузу.<br></center>\n";
}
if ($GlobalUser['admin'] > 0) {
    $OverviewMessage .= "<center>" . loca("OVERVIEW_ADMIN_NOTE") . "<br></center>\n";
}
PageFooter($OverviewMessage, $OverviewError, false);
ob_end_flush();
Exemplo n.º 15
0
<?php 
if ($internal) {
    $pranger_url = "index.php?page=pranger&session={$session}&from";
} else {
    $pranger_url = "pranger.php?from";
}
if ($from >= 50) {
    echo "     <a href=\"" . $pranger_url . "=" . ($from - 50) . "\"><< Предыдущие 50</a>&nbsp;&nbsp;&nbsp;&nbsp;\n";
}
if ($total >= 50) {
    echo "        <a href=\"" . $pranger_url . "=" . ($from + 50) . "\">Следующие 50 >></a>\n";
}
?>
      </th>
   </tr>
   </table>
  </center>

 </body>
</html>

<?php 
// ************************************************************************************
if ($internal) {
    echo "<br><br><br><br>\n";
    echo "</center>\n";
    echo "</div>\n";
    echo "<!-- END CONTENT AREA -->\n";
    PageFooter("", "");
}
ob_end_flush();
Exemplo n.º 16
0
            $d = $cost['d'];
            $e = $cost['e'];
            $meet = IsEnoughResources($planet, $m, $k, $d, $e);
            $color = $meet ? "lime" : "red";
            echo "                <a href=\"index.php?page=buildings&session={$session}&cp=" . $planet['planet_id'] . "&mode=Verteidigung&planettype={$planettype}\">\n";
            echo "                    <font color =\"{$color}\">\n";
            echo "                        " . nicenum($amount) . "                  </font>\n";
            echo "                </a>    \n";
        } else {
            echo "                <font color=\"white\">-</font>\n";
        }
    }
    echo "            <th width=\"75\">" . nicenum($sum) . "</th>\n\n";
    echo "            </th>\n\n";
    echo "       </tr>\n";
}
?>

<!-- ## 
<!-- ## Footer
<!-- ## -->     

</table>
<br><br><br><br>
</center>
</div>
<!-- END CONTENT AREA -->

<?php 
PageFooter("", "", false, 0);
ob_end_flush();
Exemplo n.º 17
0
/**
 * The screen to edit a weblog, screen 3
 */
function main_blogs_edit3()
{
    global $Pivot_Vars, $blog_settings, $Weblogs;
    PageHeader(lang('weblog_config', 'create_3'));
    PageAnkeiler(lang('userbar', 'admin') . ' &raquo; ' . lang('weblog_config', 'create_3'));
    if (isset($Pivot_Vars['orig_name']) && strlen($Pivot_Vars['orig_name']) > 1) {
        $blog_settings = $Weblogs[$Pivot_Vars['orig_name']];
        $orig_name = $Pivot_Vars['orig_name'];
        MidHeading(sprintf(lang('weblog_config', 'edit_weblog') . ' \'%s\'', $Weblogs[$Pivot_Vars['orig_name']]['name']));
    } else {
        $blog_settings = get_tempweblog();
        $orig_name = "";
        MidHeading(lang('weblog_config', 'create_new'));
    }
    $temp_subweblogs = $Pivot_Vars['sub_weblog'];
    foreach ($temp_subweblogs as $subweblog => $dummy) {
        // fix the subweblogs' categories..
        if (count($temp_subweblogs[$subweblog]['categories']) > 0) {
            foreach ($temp_subweblogs[$subweblog]['categories'] as $cat => $dummy) {
                unset($temp_subweblogs[$subweblog]['categories'][$cat]);
                $temp_subweblogs[$subweblog]['categories'][] = $cat;
            }
        } else {
            // you are an idiot if you did not select any categories..
            $temp_subweblogs[$subweblog]['categories'] = array();
        }
    }
    // unserialize the parsed temp_weblog..
    $temp_weblog = unserialize(urldecode($Pivot_Vars['temp_weblog']));
    // merge temp_weblog with temp_subweblogs
    $temp_weblog['sub_weblog'] = $temp_subweblogs;
    StartForm('blog_save', 1);
    StartTable();
    EndForm(lang('weblog_config', 'create'), 2);
    $settings = get_weblog_config3();
    $settings[] = array('orig_name', 'originalname', '', 7, $orig_name);
    $settings[] = array('temp_weblog', 'tempweblog', '', 7, urlencode(serialize($temp_weblog)));
    DisplaySettings($settings, 'blog_settings');
    EndForm(lang('weblog_config', 'create'), 1);
    PageFooter();
}
Exemplo n.º 18
0
                echo ",";
            }
            echo $temp["ship{$gid}"];
        }
        echo ");\">\n";
        echo "       " . $temp['name'] . "</a>\n";
        echo "        </th>\n";
        $count++;
        if ($count == 2) {
            echo "           </tr>\n";
            $count = 0;
        }
    }
}
?>
 
   <tr height="20">
    <th colspan="4"><input type="submit" value="Дальше" /></th>
   </tr>
<tr><th colspan=4>
</th></tr>
</form>
</table>
<br><br><br><br>
</center>
</div>
<!-- END CONTENT AREA -->

<?php 
PageFooter($FleetMessage, $FleetError);
ob_end_flush();
Exemplo n.º 19
0
        $amount = floor(abs(intval($_POST["c{$gid}"])));
        if ($amount > $source["f{$gid}"]) {
            $GateError .= "<center>\nНедостаточно кораблей в наличии.<br></center>\n";
            break;
        }
        $fleet[$gid] = $amount;
    }
    $fleet[212] = 0;
    // лампы.
}
// Сделать переход
if ($GateError === "") {
    // Перебросить флот
    AdjustShips($fleet, $source_id, '-');
    AdjustShips($fleet, $target_id, '+');
    $cooldown_time = 60 * 60 / $GlobalUni['fspeed'] - 1;
    $cooldown = $now + $cooldown_time;
    // Нагреть ворота
    $now = time();
    $query = "UPDATE " . $db_prefix . "planets SET gate_until=" . $cooldown . " WHERE planet_id={$source_id}";
    dbquery($query);
    $query = "UPDATE " . $db_prefix . "planets SET gate_until=" . $cooldown . " WHERE planet_id={$target_id}";
    dbquery($query);
    // Сделать редирект на ворота целевой луны
    MyGoto("infos", "&cp={$target_id}&gid=43");
}
echo "</center>\n";
echo "</div>\n";
echo "<!-- END CONTENT AREA -->\n\n";
PageFooter("", $GateError);
ob_end_flush();
Exemplo n.º 20
0
$sAction = $_REQUEST['action'];
$sError = '';
define('BX_SKIP_INSTALL_CHECK', true);
// --------------------------------------------
if ($sAction == 'step6' || $sAction == 'step7' || $sAction == 'compile_languages') {
    require_once '../inc/header.inc.php';
    require_once BX_DIRECTORY_PATH_INC . 'db.inc.php';
    require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
}
// --------------------------------------------
require_once '../inc/classes/BxDolIO.php';
$sInstallPageContent = InstallPageContent($sError);
mb_internal_encoding('UTF-8');
echo PageHeader($sAction, $sError);
echo $sInstallPageContent;
echo PageFooter($sAction);
function InstallPageContent(&$sError)
{
    global $aConf, $confFirst, $aDbConf, $aGeneral;
    $sRet = '';
    switch ($_REQUEST['action']) {
        case 'compile_languages':
            performInstallLanguages();
            $sRet .= 'Default Dolphin language was recompiled';
            break;
        case 'step7':
            $sRet .= genMainDolphinPage();
            break;
        case 'step6':
            $sErrorMessage = checkPostInstallPermissions($sError);
            $sRet .= strlen($sErrorMessage) ? genPostInstallPermissionTable($sErrorMessage) : genMainDolphinPage();
Exemplo n.º 21
0
/**
 * The screen that lets users add a bookmarklet.
 *
 */
function u_marklet_screen()
{
    global $config_array, $Paths;
    PageHeader(lang('userbar', 'userinfo'), 1);
    PageAnkeiler(lang('userbar', 'userinfo') . ' &raquo; ' . lang('bookmarklets', 'bm_add'));
    // A quick hack to make sure the raquo's are encoded when using UTF-8
    $withlinktitle = lang('bookmarklets', 'bm_withlink');
    $nolinktitle = lang('bookmarklets', 'bm_nolink');
    $withlinktitle = str_replace("&raquo;", "&#187;", str_replace("»", "&#187;", $withlinktitle));
    $nolinktitle = str_replace("&raquo;", "&#187;", str_replace("»", "&#187;", $nolinktitle));
    $url = gethost() . $Paths['pivot_url'] . "index.php?menu=entries&amp;func=new_entry";
    $withlink = sprintf("javascript:bm=document.selection?document.selection.createRange().text:document.getSelection();void(open('%s&url='+escape(location.href)+'&i='+escape(bm)+'&t='+escape(document.title), 'new_log_entry', 'resizable=yes, scrollbars=yes, width=790, height=480, location=yes, status=yes'));", $url);
    $nolink = sprintf("javascript:void(open('%s','new_log_entry', 'resizable=yes, scrollbars=yes, width=790, height=480, location=yes, status=yes'));", $url);
    $main_funcs = array(array($withlinktitle, $withlink, lang('bookmarklets', 'bm_withlink_desc')), array($nolinktitle, $nolink, lang('bookmarklets', 'bm_nolink_desc')));
    DispPage($main_funcs);
    echo "<p>" . lang('bookmarklets', 'bookmarklets_info');
    echo "<ul><li>" . lang('bookmarklets', 'bookmarklets_info_1') . "</li>";
    echo "<li>" . lang('bookmarklets', 'bookmarklets_info_2') . "</li></ul></p>";
    PageFooter();
}
Exemplo n.º 22
0
 /**
  * Forum-specific export format
  * @todo Project file size / export time and possibly break into multiple files
  * 
  */
 protected function ForumExport($Ex)
 {
     // Begin
     PageHeader();
     $Ex->BeginExport('export ' . date('Y-m-d His') . '.txt.gz', 'Vanilla 1.x');
     // Users
     $User_Map = array('UserID' => 'UserID', 'Name' => 'Name', 'Password' => 'Password', 'Email' => 'Email', 'CountComments' => 'CountComments');
     $Ex->ExportTable('User', "SELECT * FROM :_User", $User_Map);
     // ":_" will be replaced by database prefix
     // Roles
     /*
        'RoleID' => 'int', 
        'Name' => 'varchar(100)', 
        'Description' => 'varchar(200)'
     */
     $Role_Map = array('RoleID' => 'RoleID', 'Name' => 'Name', 'Description' => 'Description');
     $Ex->ExportTable('Role', 'select * from :_Role', $Role_Map);
     // UserRoles
     /*
        'UserID' => 'int', 
        'RoleID' => 'int'
     */
     $UserRole_Map = array('UserID' => 'UserID', 'RoleID' => 'RoleID');
     $Ex->ExportTable('UserRole', 'select UserID, RoleID from :_User', $UserRole_Map);
     // Categories
     /*
               'CategoryID' => 'int', 
               'Name' => 'varchar(30)', 
               'Description' => 'varchar(250)', 
               'ParentCategoryID' => 'int', 
               'DateInserted' => 'datetime', 
               'InsertUserID' => 'int', 
               'DateUpdated' => 'datetime', 
               'UpdateUserID' => 'int'
     */
     $Category_Map = array('CategoryID' => 'CategoryID', 'Name' => 'Name', 'Description' => 'Description');
     $Ex->ExportTable('Category', "select CategoryID, Name, Description from :_Category", $Category_Map);
     // Discussions
     /*
        'DiscussionID' => 'int', 
        'Name' => 'varchar(100)', 
        'CategoryID' => 'int', 
        'Body' => 'text', 
        'Format' => 'varchar(20)', 
        'DateInserted' => 'datetime', 
        'InsertUserID' => 'int', 
        'DateUpdated' => 'datetime', 
        'UpdateUserID' => 'int', 
        'Score' => 'float', 
        'Announce' => 'tinyint', 
        'Closed' => 'tinyint'
     */
     $Discussion_Map = array('DiscussionID' => 'DiscussionID', 'Name' => 'Name', 'CategoryID' => 'CategoryID', 'Body' => 'Body', 'DateInserted' => 'DateCreated', 'InsertUserID' => 'AuthUserID', 'DateUpdated' => 'DateLastActive', 'UpdateUserID' => 'LastUserID', 'Closed' => 'Closed');
     $Ex->ExportTable('Discussion', "\n         SELECT d.*,c.Body FROM :_Discussion d\n         LEFT JOIN :_Comment c ON (c.CommentID = d.FirstCommentID)", $Discussion_Map);
     // Comments
     /*
        'CommentID' => 'int', 
        'DiscussionID' => 'int', 
        'DateInserted' => 'datetime', 
        'InsertUserID' => 'int', 
        'DateUpdated' => 'datetime', 
        'UpdateUserID' => 'int', 
        'Format' => 'varchar(20)', 
        'Body' => 'text', 
        'Score' => 'float'
     */
     $Comment_Map = array('CommentID' => 'CommentID', 'DiscussionID' => 'DiscussionID', 'InsertUserID' => 'AuthUserID', 'DateInserted' => 'DateCreated', 'UpdateUserID' => 'EditUserID', 'DateUpdated' => 'DateEdited', 'Body' => 'Body');
     $Ex->ExportTable('Comment', "\n         SELECT * FROM :_Comment c\n         WHERE c.WhisperUserID = 0", $Comment_Map);
     // Conversations
     /*
         'ConversationID' => 'int', 
         'FirstMessageID' => 'int', 
         'DateInserted' => 'datetime', 
         'InsertUserID' => 'int', 
         'DateUpdated' => 'datetime', 
         'UpdateUserID' => 'int'
     */
     $Conversation_Map = array('ConversationID' => 'DiscussionID', 'InsertUserID' => 'AuthUserID', 'DateInserted' => 'DateCreated', 'UpdateUserID' => 'EditUserID', 'DateUpdated' => 'DateEdited');
     $Ex->ExportTable('Conversation', "SELECT DISTINCT DiscussionID, AuthUserID, DateCreated, EditUserID, DateEdited \n         FROM :_Comment c\n         WHERE c.WhisperUserID > 0\n         GROUP BY DiscussionID", $Conversation_Map);
     // ConversationMessage
     /*
        'MessageID' => 'int', 
        'ConversationID' => 'int', 
        'Body' => 'text', 
        'InsertUserID' => 'int', 
        'DateInserted' => 'datetime'
     */
     $ConversationMessage_Map = array('MessageID' => 'CommentID', 'ConversationID' => 'DiscussionID', 'Body' => 'Body', 'InsertUserID' => 'AuthUserID', 'DateInserted' => 'DateCreated');
     $Ex->ExportTable('ConversationMessage', "\n         SELECT CommentID, DiscussionID, AuthUserID, DateCreated, Body FROM :_Comment c\n         WHERE c.WhisperUserID > 0", $ConversationMessage_Map);
     // UserConversation
     $Ex->Query("CREATE TEMPORARY TABLE VanillaExportUserConversations (`UserID` INT NOT NULL ,`ConversationID` INT NOT NULL)");
     $Ex->Query("\n            INSERT INTO VanillaExportUserConversations (ConversationID, UserID) \n            SELECT DISTINCT DiscussionID AS ConversationID, AuthUserID AS UserID FROM :_Comment \n            WHERE WhisperUserID > 0\n            GROUP BY DiscussionID");
     $Ex->Query("\n            INSERT INTO VanillaExportUserConversations (ConversationID, UserID) \n            SELECT DISTINCT DiscussionID AS ConversationID, WhisperUserID AS UserID FROM :_Comment\n            WHERE WhisperUserID > 0\n            GROUP BY DiscussionID");
     /*
        'UserID' => 'int', 
        'ConversationID' => 'int', 
        'LastMessageID' => 'int'
     */
     $UserConversation_Map = array('UserID' => 'UserID', 'ConversationID' => 'ConversationID');
     $Ex->ExportTable('UserConversation', "SELECT ConversationID, UserID FROM VanillaExportUserConversations", $UserConversation_Map);
     // End
     $Ex->EndExport();
     PageFooter();
 }
Exemplo n.º 23
0
/**
 * Message: Result of export
 */
function ViewExportResult($Msgs = '', $Class = 'Info', $Path = '')
{
    PageHeader();
    if ($Msgs) {
        // TODO: Style this a bit better.
        echo "<div class=\"{$Class}\">";
        foreach ($Msgs as $Msg) {
            echo "<p>{$Msg}</p>\n";
        }
        echo "</div>";
        if ($Path) {
            echo "<a href=\"{$Path}\"><b>Download {$Path}</b></a>";
        }
    }
    PageFooter();
}
Exemplo n.º 24
0
                            <a href='index.php?page=micropayment&buynow=1&type=5&days=7&session=<?php 
echo $session;
?>
' >
                            <b><?php 
echo loca("PREM_WEEK");
?>
                          <br><font color=lime><?php 
echo nicenum($price[5]);
?>
</font>

                            <br><?php 
echo loca("DM");
?>
</b></a>
                        </td>
                    </tr>
                        

          </table>
          <br>

<?php 
// ************************************************************************************
echo "<br><br><br><br>\n";
echo "</center>\n";
echo "</div>\n";
echo "<!-- END CONTENT AREA -->\n";
PageFooter($MicropaymentMessage, $MicropaymentError);
ob_end_flush();
Exemplo n.º 25
0
            $note = dbarray($result);
            if ($note['prio'] == 0) {
                $col = "lime";
            } else {
                if ($note['prio'] == 1) {
                    $col = "yellow";
                } else {
                    if ($note['prio'] == 2) {
                        $col = "red";
                    }
                }
            }
            echo "<tr>\n";
            echo "  <th width=20><input type=checkbox name=\"delmes[" . $note['note_id'] . "]\" value=\"y\"></th>\n";
            echo "  <th width=150>" . date("Y-m-d H:i:s", $note['date']) . "</th>\n";
            echo "  <th><a href=?page=notizen&session=" . $_GET['session'] . "&a=2&n=" . $note['note_id'] . "><font color={$col}>" . stripslashes($note['subj']) . "</font></a></th>\n";
            echo "  <th width=40 align=right>" . $note['textsize'] . "</th>\n";
            echo "</tr>\n\n";
        }
    } else {
        echo "<tr><th colspan=4>" . loca("NOTE_NO_NOTES") . "</th></tr>\n\n";
    }
    echo "<tr><td colspan=4><input type=submit value='" . loca("NOTE_DELETE") . "'></td></tr>\n";
    echo "</table>\n";
    echo "</form><br><br><br><br>\n";
}
echo "</center>\n";
echo "</div>\n";
echo "<!-- END CONTENT AREA -->\n";
PageFooter("", "", true, 0);
ob_end_flush();
Exemplo n.º 26
0
echo "<tr><td class=\"c\" colspan=\"4\">Операторы</td></tr>\n";
$result = EnumOperators();
$rows = dbrows($result);
while ($rows--) {
    $oper = dbarray($result);
    ?>
                <tr>
            <th colspan="4" valign="left">
            <?php 
    echo $oper['oname'];
    ?>
            <a href="mailto:<?php 
    echo $oper['email'];
    ?>
?subject=<?php 
    echo va("Вопрос от #1 из #2-й вселенной", $GlobalUser['oname'], $uni['num']);
    ?>
" ><img src="<?php 
    echo UserSkin();
    ?>
img/m.gif" border="0" alt="Написать сообщение"></a>          </th>
        </tr>
<?php 
}
echo "</table></td></tr></table>\n";
echo "<br><br><br><br>\n";
echo "</center>\n";
echo "</div>\n";
echo "<!-- END CONTENT AREA -->\n";
PageFooter();
ob_end_flush();
Exemplo n.º 27
0
function ConfirmPage($title, $params, $message)
{
    global $Pivot_Vars;
    PageHeader($title, 1);
    if ($Pivot_Vars['func'] == 'admin') {
        StartForm($Pivot_Vars['do']);
    } else {
        StartForm($Pivot_Vars['func']);
    }
    if (is_array($params)) {
        $acount = count($params) / 2;
        for ($i = 0; $i < $acount; $i++) {
            $j = 1 + 2 * $i;
            echo '<input type="hidden" name="' . $params[$j - 1] . '" value=\'' . $params[$j] . '\' />' . "\n";
            //echo '<br />(input type="hidden" name="'.$params[$j-1].'" value=\''.$params[$j].'\')'."\n";
        }
    }
    echo '<div style="padding:20px 10px"><input type="hidden" name="confirmed" value="1" />' . "\n";
    Paragraph(wordwrap($message, 80, "<br />") . '<br /><br /><br /><input type="submit" value="' . lang('general', 'continue') . '" class="button" />');
    echo '</div></form>' . "\n";
    PageFooter();
    exit;
}