Exemplo n.º 1
0
            ?>
 "> NEXT </a> <?php 
            $qs = build_url(build_qs(null, 'offset', $numpages));
            ?>
 // <a href="<?php 
            echo $qs;
            ?>
 "> LAST </a> <?php 
        }
        echo "</div>\n";
    }
} else {
    echo browsingMenu($dbconn, $index);
    echo "<h3> Browse by Functional Team </h3>\n";
    echo "<div class=teamlist><ul>\n";
    while ($row = pg_fetch_array($result, null, PGSQL_ASSOC)) {
        echo "<li>" . hierlink('team', $row['account_collection_id'], $row['account_collection_name']) . "</li>\n";
    }
    echo "</ul>\n";
    echo "</div>\n";
}
echo build_footer();
// Free resultset
pg_free_result($result);
// Closing connection
pg_close($dbconn);
?>
</div>
</body>
</html>
Exemplo n.º 2
0
/**
* $output_format can be: language, prosilver and subsilver2
*/
function build_code_changes($output_format)
{
    global $substitute_new, $substitute_old, $simple_name_old, $simple_name_new, $echo_changes, $package_changed_files, $location, $debug_file, $s_name;
    // Global array holding the data entries
    $data = array('header' => array(), 'diff' => array());
    // Read diff file and prepare the output filedata...
    //$patch_filename = '../new_version/patches/phpBB-' . $substitute_old . '_to_' . $substitute_new . '.patch';
    $release_filename = 'phpbb-' . $substitute_old . '_to_' . $substitute_new . '_' . $output_format . '.txt';
    if (!$package_changed_files) {
        if (!$echo_changes) {
            $fp = fopen('save/' . $s_name . '/' . $output_format . '/' . $release_filename, 'wb');
            if (!$fp) {
                die('Unable to create ' . $release_filename);
            }
        }
    }
    include_once $location . '/build_helper.php';
    $package = new build_package(array($substitute_old, $substitute_new), false);
    $titles = array('language' => 'phpBB ' . $substitute_old . ' to phpBB ' . $substitute_new . ' Language Pack Changes', 'prosilver' => 'phpBB ' . $substitute_old . ' to phpBB ' . $substitute_new . ' prosilver Changes', 'subsilver2' => 'phpBB ' . $substitute_old . ' to phpBB ' . $substitute_new . ' subsilver2 Changes');
    $data['header'] = array('title' => $titles[$output_format], 'intro' => '

These are the ' . $titles[$output_format] . ' summed up into a little Mod. These changes are only partial and do not include any code changes, therefore not meant for updating phpBB.

	', 'included_files' => array());
    // We collect the files we want to diff first (ironically we grab this from a diff file)
    if (!$echo_changes) {
        echo "\n\nCollecting Filenames:";
    }
    // We re-create the patch file
    foreach ($package->old_packages as $_package_name => $dest_package_filename) {
        chdir($package->locations['old_versions']);
        if (!$echo_changes) {
            echo "\n\n" . 'Creating patch/diff files for phpBB-' . $dest_package_filename . $package->get('new_version_number');
        }
        $dest_package_filename = $location . '/save/' . $s_name . '/phpBB-' . $dest_package_filename . $package->get('new_version_number') . '.patch';
        $package->run_command('diff ' . $package->diff_options . ' ' . $_package_name . ' ' . $package->get('simple_name') . ' > ' . $dest_package_filename);
        // Parse this diff to determine file changes from the checked versions and save them
        $result = $package->collect_diff_files($dest_package_filename, $_package_name);
        $package->run_command('rm ' . $dest_package_filename);
    }
    chdir($location);
    $filenames = array();
    foreach ($result['files'] as $filename) {
        if ($debug_file !== false && $filename != $debug_file) {
            continue;
        }
        // Decide which files to compare...
        switch ($output_format) {
            case 'language':
                if (strpos($filename, 'language/en/') !== 0) {
                    continue 2;
                }
                break;
            case 'prosilver':
                if (strpos($filename, 'styles/prosilver/') !== 0) {
                    continue 2;
                }
                break;
            case 'subsilver2':
                if (strpos($filename, 'styles/subsilver2/') !== 0) {
                    continue 2;
                }
                break;
        }
        if (!file_exists($location . '/old_versions/' . $simple_name_old . '/' . $filename)) {
            // New file... include it
            $data['header']['included_files'][] = array('old' => $location . '/old_versions/' . $simple_name_old . '/' . $filename, 'new' => $location . '/old_versions/' . $simple_name_new . '/' . $filename, 'phpbb_filename' => $filename);
            continue;
        }
        $filenames[] = array('old' => $location . '/old_versions/' . $simple_name_old . '/' . $filename, 'new' => $location . '/old_versions/' . $simple_name_new . '/' . $filename, 'phpbb_filename' => $filename);
    }
    // Now let us go through the filenames list and create a more comprehensive diff
    if (!$echo_changes) {
        fwrite($fp, build_header($output_format, $filenames, $data['header']));
    } else {
        //echo build_header('text', $filenames, $data['header']);
    }
    // Copy files...
    $files_to_copy = array();
    foreach ($data['header']['included_files'] as $filename) {
        $files_to_copy[] = $filename['phpbb_filename'];
    }
    // First step is to copy the new version over (clean structure)
    if (!$echo_changes && sizeof($files_to_copy)) {
        foreach ($files_to_copy as $file) {
            // Create directory?
            $dirname = dirname($file);
            if ($dirname) {
                $dirname = explode('/', $dirname);
                $__dir = array();
                foreach ($dirname as $i => $dir) {
                    $__dir[] = $dir;
                    run_command("mkdir -p {$location}/save/" . $s_name . '/' . $output_format . '/' . implode('/', $__dir));
                }
            }
            $source_file = $location . '/new_version/phpBB3/' . $file;
            $dest_file = $location . '/save/' . $s_name . '/' . $output_format . '/';
            $dest_file .= $file;
            $command = "cp -p {$source_file} {$dest_file}";
            $result = trim(`{$command}`);
            echo "- Copied File: " . $source_file . " -> " . $dest_file . "\n";
        }
    }
    include_once 'diff_class.php';
    if (!$echo_changes) {
        echo "\n\nDiffing Codebases:";
    }
    foreach ($filenames as $file_ary) {
        if (!file_exists($file_ary['old'])) {
            $lines1 = array();
        } else {
            $lines1 = file($file_ary['old']);
        }
        $lines2 = file($file_ary['new']);
        if (!sizeof($lines1)) {
            // New File
        } else {
            $diff = new Diff($lines1, $lines2);
            $fmt = new BBCodeDiffFormatter(false, 5, $debug_file);
            if (!$echo_changes) {
                fwrite($fp, $fmt->format_open($file_ary['phpbb_filename']));
                fwrite($fp, $fmt->format($diff, $lines1));
                fwrite($fp, $fmt->format_close($file_ary['phpbb_filename']));
            } else {
                echo $fmt->format_open($file_ary['phpbb_filename']);
                echo $fmt->format($diff, $lines1);
                echo $fmt->format_close($file_ary['phpbb_filename']);
            }
            if ($debug_file !== false) {
                echo $fmt->format_open($file_ary['phpbb_filename']);
                echo $fmt->format($diff, $lines1);
                echo $fmt->format_close($file_ary['phpbb_filename']);
                exit;
            }
        }
    }
    if (!$echo_changes) {
        fwrite($fp, build_footer($output_format));
        // Close file
        fclose($fp);
        chmod('save/' . $s_name . '/' . $output_format . '/' . $release_filename, 0666);
    } else {
        echo build_footer($output_format);
    }
}
        print "<th class='brslist_level2'>Albums</th>";
        $albumlist = json_decode(get_albums());
        if ($albumlist) {
            foreach ($albumlist as $album) {
                if (isset($level1)) {
                    if (preg_match("/^" . stripslashes($level1) . "/i", $album->title)) {
                        print "<tr><td class='brslist_level1'>\n";
                        write_albumlink("browse.php?level0=al-ti&level1={$level1}&sourceid=", $album->cddbid, html_entity_decode($album->title, ENT_COMPAT, "UTF-8"), $sourceid);
                        print "</td></tr>\n";
                    }
                } else {
                    print "<tr><td class='brslist_level1'>\n";
                    write_albumlink("browse.php?level0=al-ti&level1={$level1}&sourceid=", $album->cddbid, html_entity_decode($album->title, ENT_COMPAT, "UTF-8"), $sourceid);
                    print "</td></tr>\n";
                }
            }
        }
        print "</table>\n";
        print "</div>\n";
        if (isset($sourceid)) {
            # sourceid specified?
            print "<div class='searchresults border-left'>\n";
            $tracklist = json_decode(get_album_tracks($sourceid));
            write_tracklist($tracklist);
            print "</div>\n";
        }
        print "</div>\n";
    }
}
build_footer("browse");
Exemplo n.º 4
0
?>
												</div>
										  </div>

										  </form>
										  <script>
                                   $(function () {
                                       $("#startDate").datepicker();
                                       $("#endDate").datepicker();
                                   });
                                   function openstartdatepicker() {
                                       $("#startDate").datepicker("show");
                                   }
                                   function openenddatepicker() {
                                       $("#endDate").datepicker("show");
                                   }
										  </script>
									 </div><!-- /.box-body -->
								</div><!-- /.box -->
						  </div>
						  <div class='col-md-2'></div>
					 </div>

				</div> <!-- /container -->
		  </div> <!-- /content-wrapper -->

		  <?php 
build_footer();
?>
	 </body>
</html>
			$('#queryresult').html("").html(json);
			$('table.tracklist tbody tr:odd').addClass('odd');
			$('table.tracklist tbody tr:even').addClass('even');
		});
		var querystring = selectstring+wherestring+" ORDER BY artist";
	}

</script>

<?php 
build_body("Search");
?>
		<div class="results">
		<div class="searchform">
		<form id="search_form">
		<table>
				<tr><th>Artist</th><td><input id="artist" name="artist" /></td></tr>
				<tr><th>Title</th><td><input id="title" name="title" /></td></tr>
<!--				<tr><th>Album</th><td><input name="album" /></td></tr> -->
				<tr><th colspan="2" class="but"><input type="reset" value="Clear"><input type="button" id="submitbutton" value="Search"/></th></tr>
		</table>
		</form>
		</div>
		<div class="searchresults border-left">
		<div id="where" class="whereclause"></div>
		<div id="queryresult" class="searchresults2"></div>
		</div>
		</div>
<?php 
build_footer("Search");