PHP Classes

File: templates/repos.php

Recommend this page to a friend!
  Classes of Jaswinder   PHP My SVN Admin   templates/repos.php   Download  
File: templates/repos.php
Role: Sample output
Content type: text/plain
Description: Sample output
Class: PHP My SVN Admin
Manage SubVersion repositories
Author: By
Last change: Add Branch addition in when adding repo permission so that we can assign different branches to users and not just root
Date: 12 years ago
Size: 2,512 bytes
 

Contents

Class file image Download
<fieldset> <legend>Create new repository</legend> <input type="text" name="client" value="" id="newclient">: Client<br> <input type="text" name="project" value="" id="newproject">: Project<br> <input type="submit" name="submit" value="Create new project" onclick="$.get('index.php?func=repos&action=create&client='+$('#newclient').val()+'&project='+$('#newproject').val(), function(data) {loadCurrentTab();});return false;"> </fieldset> <table border="1"> <?php $i=0; foreach($data['svn']->svnPermissions as $repo=>$permissions){ $i++; if($repo == 'aliases' || $repo =='groups'){ continue; } $arrRepo = explode(':',$repo); if(isset($_GET['test'])){ // /printr($arrRepo); } echo '<tr><td colspan="3" valign="top">Repo: <a target="_blank" href="'.$data['config']['url_svn'].'/'.$arrRepo[0].'/trunk">'.$arrRepo[0].'/trunk</a><br/>'; echo 'Database: <a target="_blank" href="'.$data['config']['url_svn'].'/'.$arrRepo[0].'/databases">'.$arrRepo[0] .'/databases</a><br/>'; echo 'Branch: <a target="_blank" href="'.$data['config']['url_svn'].'/'.$arrRepo[0].$arrRepo[1].'">'.$arrRepo[1] .'</a>'; echo '</td>'; echo '<td><table width="100%">'; foreach($permissions as $user=>$permission){ echo '<tr><td width="350" ><Strong>'.$user.'</strong></td><td width="30%">'.$permission.'</td>'; echo '<td><a href="javascript:" onclick="$.get(\'index.php?func=repos&action=remove&repo='.$repo.'&ug='.$user.'\', function(data) {loadCurrentTab();});">Remove</a></td>'; echo '</tr>'; } echo '<tr>'; $arrGroups = array(); foreach($data['svn']->svnPermissions['groups'] as $group=>$users){ $arrGroups['@'.$group] = $users; } echo '<td width="450"><hr/>'.genHtmlSelectTag('user'.$i,array_merge( $arrGroups, $data['svn']->svnUsers),true); ?> <input id="branch<?php echo $i;?>" type="text" name="branch<?php echo $i;?>" value="/"> :Branch<br /> <input id="permission<?php echo $i;?>" type="radio" name="permission<?php echo $i;?>" value="rw">:rw <input id="permission<?php echo $i;?>" type="radio" name="permission<?php echo $i;?>" value="r" checked="checked">:r <br/> <a href="javascript:" onclick="$.get('index.php?func=repos&action=add&repo=<?php echo $repo;?>&b='+$('#branch<?php echo $i;?>').val()+'&ug='+$('#user<?php echo $i;?>').val()+'&perm='+$('#permission<?php echo $i;?>:checked').val(), function(data) {loadCurrentTab();});">Add</a> <br/> </td> <td></td> <?php echo '</tr>'; echo '</table></td>'; echo '</td></tr>'; } ?> </table>