Browse the code

 

Differences between 608 and 609 on /.
Number of edited files: 66 (0 added, 0 deleted and 66 modified)
Revision 609

About 1 month and 15 days ago.

* Disabled 8192 errors reporting in third-parties libs
* Use GeSHI in /usr/share/php-geshi if exists
* Removed all <? short open tags in every .tpl files (PHP 7 compatibility)
Added file(s) Deleted file(s) Modified file(s)

 

Old New Code
48
48
            die ('There are no configuration file. CodingTeam cannot start.');
49
49

                                        
50
50
        // Check if the configuration file is well formed
51
 
        $xml = new DomDocument();
 
51
        $xml = new DOMDocument();
52
52
        $xml->load(CT_BASEDIR.'/inc/codingteam.cfg');
53
53
        if (!$xml->schemaValidate(CT_BASEDIR.'/inc/codingteam-conf.xsd'))
54
54
            die ('The configuration file is not well formed. '.
55
55

                                        

 

Old New Code
106
106
        // Don't show errors for libs used by CodingTeam
107
107
        $libs = CT_BASEDIR.'/inc/libs';
108
108
        $nlibs = mb_strlen($libs);
109
 
        if (($error[0] == 2048 || $error[0] == 8 || $error[0] == 2)
 
109
        if (($error[0] == 2048 || $error[0] == 8 || $error[0] == 2 || $error[0] == 8192)
110
110
            && mb_substr($error[2], 0, $nlibs) == $libs)
111
111
            return FALSE;
112
112

                                        
382
382
        exit();
383
383
    }
384
384
}
385
 
?>
 
385
?>
386
386

                                        

 

Old New Code
1170
1170
 */
1171
1171
function HTMLSourceView($source, $lang, $hlline=FALSE, $link=FALSE, $n=TRUE)
1172
1172
{
1173
 
    require_once(CT_BASEDIR.'/inc/libs/geshi/geshi.php');
 
1173
    if (file_exists('/usr/share/php-geshi/geshi.php'))
 
1174
        require_once('/usr/share/php-geshi/geshi.php');
 
1175
    else
 
1176
        require_once(CT_BASEDIR.'/inc/libs/geshi/geshi.php');
1174
1177

                                        
1175
1178
    $geshi = new GeSHi($source, $lang);
1176
1179
    $geshi->enable_line_numbers(GESHI_NO_LINE_NUMBERS);
1643
1646

                                        
1644
1647
    return $return;
1645
1648
}
1646
 
?>
 
1649
?>
1647
1650

                                        

 

Old New Code
1
1
<h1><?=i18n('Edit data');?></h1>
2
2

                                        
3
 
<? if ($home): ?>
 
3
<?php if ($home): ?>
4
4
  <h2><?=i18n('Edit data schemas');?></h2>
5
5
  <div class="box error">
6
6
    <p>
10
10
  </div>
11
11
  <p><?=i18n('Start by choosing the data you want to edit in the menu…');?></p>
12
12

                                        
13
 
<? else: ?>
 
13
<?php else: ?>
14
14
  <form action="<?=getURLByTags($this->page);?>" method="post">
15
15

                                        
16
16
  <h2><?=$what_name;?></h2>
26
26
    </thead>
27
27
    <tbody>
28
28
      <?$i=0;?>
29
 
      <? foreach ($array as $key => $value): ?>
30
 
      <? (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
 
29
      <?php foreach ($array as $key => $value): ?>
 
30
      <?php (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
31
31
        <tr class="<?=$cl;?>">
32
32
          <td>
33
33
            <input type="text" name="key_<?=$i;?>" value="<?=$key;?>" style="margin: 0px;width: 150px;" />
40
40
          </td>
41
41
        </tr>
42
42
      <?$i++;?>
43
 
      <? endforeach; ?>
 
43
      <?php endforeach; ?>
44
44
      <tr>
45
45
        <td colspan="3">
46
46
          <strong><?=i18n('Add a new entry:');?></strong>
63
63
  </p>
64
64

                                        
65
65
  </form>
66
 
<? endif; ?>
 
66
<?php endif; ?>
67
67

                                        

 

Old New Code
3
3

                                        
4
4
<div class="fstree">
5
5
  <ul>
6
 
  <? foreach ($locationbar as $loc): ?>
 
6
  <?php foreach ($locationbar as $loc): ?>
7
7
    <li class="dir <?=(($loc['is_current']) ? 'current' : '');?>">
8
8
      <a href="admin/admin/filemanager<?=$loc['place'];?>">
9
9
        <strong><?=$loc['name'];?></strong></a></li>
10
 
  <? endforeach; ?>
 
10
  <?php endforeach; ?>
11
11
  </ul>
12
12
</div>
13
13

                                        
20
20
    </tr>
21
21
  </thead>
22
22
  <tbody>
23
 
  <? for($i=0; $i<sizeof($filelist); $i++): ?>
24
 
  <? (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
 
23
  <?php for($i=0; $i<sizeof($filelist); $i++): ?>
 
24
  <?php (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
25
25
    <tr>
26
26
      <td class="<?=$cl;?>" style="width: 16px;"><img src="public/images/icons/<?=(($filelist[$i]['type'] == 'dir') ? 'folder.png' : 'document.png');?>" alt="dir+file" /></td>
27
27
      <td class="<?=$cl;?>"><a href="admin/admin/filemanager<?=$filelist[$i]['place'];?>"><?=$filelist[$i]['name'];?></a></td>
28
28
      <td class="<?=$cl;?> center"><?=$filelist[$i]['size'];?></td>
29
29
      <td class="<?=$cl;?> center current-td"><?=$filelist[$i]['delete'];?></td>
30
30
    </tr>
31
 
  <? endfor; ?>
 
31
  <?php endfor; ?>
32
32
  </tbody>
33
33
</table>
34
34

                                        

 

Old New Code
4
4

                                        
5
5
<form action="<?=getURLByTags($this->page);?>" method="post">
6
6

                                        
7
 
<? foreach ($keys as $group): ?>
 
7
<?php foreach ($keys as $group): ?>
8
8
  <h2><?=$group['name'];?></h2>
9
9

                                        
10
10
  <table style="margin-bottom: 20px;width: 100%;">
16
16
      </tr>
17
17
    </thead>
18
18
    <tbody>
19
 
    <? foreach ($group['keys'] as $key): ?>
 
19
    <?php foreach ($group['keys'] as $key): ?>
20
20
      <tr>
21
21
        <td class="current-td"><?=$key['field'];?></td>
22
22
        <td>
23
 
          <? if (in_array($key['value'], array('true', 'false'))): ?>
 
23
          <?php if (in_array($key['value'], array('true', 'false'))): ?>
24
24
            <select name="key_<?=$key['inputname'];?>" style="margin: 0px;width: 250px;">
25
25
              <option value="true" <?=(($key['value'] == 'true') ? 'selected="selected"' : '');?>>True</option>
26
26
              <option value="false" <?=(($key['value'] == 'false') ? 'selected="selected"' : '');?>>False</option>
27
27
            </select>
28
 
          <? else: ?>
 
28
          <?php else: ?>
29
29
            <input type="text" name="key_<?=$key['inputname'];?>" value="<?=$key['value'];?>" style="margin: 0px;width: 245px;" />
30
 
          <? endif; ?>
 
30
          <?php endif; ?>
31
31
        </td>
32
32
        <td><em><?=$key['text'];?></em></td>
33
33
      </tr>
34
 
    <? endforeach; ?>
 
34
    <?php endforeach; ?>
35
35
    </tbody>
36
36
  </table>
37
 
<? endforeach; ?>
 
37
<?php endforeach; ?>
38
38

                                        
39
39
<p>
40
40
  <input type="submit" class="submit" value="<?=i18n('Change configuration settings');?>" />
41
41

                                        

 

Old New Code
13
13
    </tr>
14
14
  </thead>
15
15
  <tbody>
16
 
  <? for($i=0; $i<sizeof($modules); $i++): ?>
17
 
  <? (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
 
16
  <?php for($i=0; $i<sizeof($modules); $i++): ?>
 
17
  <?php (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
18
18
    <tr>
19
19
      <td style="width: 5px;background: <?=(($modules[$i]['is_active']) ? '#C1FFC1' : '#EE9572');?>;">&nbsp;</td>
20
20
      <td class="<?=$cl;?>"><a href="admin/admin/modules/confmod/<?=$modules[$i]['mod'];?>"><strong><?=$modules[$i]['name'];?></strong></a></td>
21
21
      <td class="<?=$cl;?>"><em><?=$modules[$i]['desc'];?></em></td>
22
22
      <td class="<?=$cl;?> center"><?=$modules[$i]['link'];?></td>
23
23
    </tr>
24
 
  <? endfor; ?>
 
24
  <?php endfor; ?>
25
25
  </tbody>
26
26
</table>
27
27

                                        

 

Old New Code
16
16
    </tr>
17
17
  </thead>
18
18
  <tbody>
19
 
  <? for($i=0; $i<sizeof($module_views); $i++): ?>
20
 
  <? (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
 
19
  <?php for($i=0; $i<sizeof($module_views); $i++): ?>
 
20
  <?php (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
21
21
    <tr>
22
22
      <td style="width: 15px;background: <?=(($module_views[$i]['is_active']) ? '#C1FFC1' : '#EE9572');?>;">&nbsp;</td>
23
23
      <td class="<?=$cl;?>"><strong><?=$module_views[$i]['name'];?></strong></td>
24
24
      <td class="<?=$cl;?> center"><?=( ($module_views[$i]['name'] == 'default') ? '-' : $module_views[$i]['link'] );?></td>
25
25
    </tr>
26
 
  <? endfor; ?>
 
26
  <?php endfor; ?>
27
27
  </tbody>
28
28
</table>
29
29

                                        

 

Old New Code
108
108
        <tbody>
109
109
          <tr>
110
110
            <td class="reportbox">
111
 
              <? if ($_view == 'list'): ?>
 
111
              <?php if ($_view == 'list'): ?>
112
112
                <p>
113
113
                  <?=i18n('You project is currently %(st)s.', array('st' => '<strong>'.$_state.'</strong>'));?>
114
114
                </p>
162
162
                    <td style="width: 15%;" class="background_minor <?=$admin_css;?> center"><?=i18n('Project leader');?></td>
163
163
                    <td style="width: 10%;" class="background_minor <?=$admin_css;?> center"><strong><?=i18n('Initiator');?></strong></td>
164
164
                  </tr>
165
 
                  <? foreach ($admins as $admin): ?>
 
165
                  <?php foreach ($admins as $admin): ?>
166
166
                    <tr>
167
167
                      <td class="background_minor border_bottom_dotted"><a href="users/show/<?=$admin['nick'];?>"><?=$admin['nick'];?></a></td>
168
168

                                        
169
 
                      <? foreach($admin['pws'] as $key => $value): ?>
170
 
                        <? if (mb_substr($key, mb_strlen($key)-5, mb_strlen($key)) != 'basic'): ?>
 
169
                      <?php foreach($admin['pws'] as $key => $value): ?>
 
170
                        <?php if (mb_substr($key, mb_strlen($key)-5, mb_strlen($key)) != 'basic'): ?>
171
171
                        <td class="background_minor <?=$admin_css;?>" style="width: 16px;">
172
 
                          <? $keybis = mb_substr($key, 0, mb_strlen($key)-5).'-basic'; ?>
173
 
                          <? if ($value): ?>
 
172
                          <?php $keybis = mb_substr($key, 0, mb_strlen($key)-5).'-basic'; ?>
 
173
                          <?php if ($value): ?>
174
174
                            <img src="public/images/accessrights/<?=$key;?>.png" class="powersbuttons" alt="<?=$key;?>" title="<?=$_access[$key];?>" />
175
 
                          <? elseif (mb_substr($key, mb_strlen($key)-5, 5) == '-full' && $admin['pws'][$keybis]): ?>
 
175
                          <?php elseif (mb_substr($key, mb_strlen($key)-5, 5) == '-full' && $admin['pws'][$keybis]): ?>
176
176
                            <img src="public/images/accessrights/<?=$keybis;?>.png" class="powersbuttons" alt="<?=$keybis;?>" title="<?=$_access[$keybis];?>" />
177
 
                          <? else: ?>
 
177
                          <?php else: ?>
178
178
                            <img src="public/images/accessrights/no.png" class="powersbuttons" />
179
 
                          <? endif; ?>
 
179
                          <?php endif; ?>
180
180
                        </td>
181
 
                        <? endif; ?>
182
 
                      <? endforeach; ?>
 
181
                        <?php endif; ?>
 
182
                      <?php endforeach; ?>
183
183

                                        
184
184
                      <td class="background_minor border_bottom_dotted center"><?=$admin['role'];?></td>
185
185
                      <td class="background_minor border_bottom_dotted">
199
199
                        </div>
200
200
                      </td>
201
201
                    </tr>
202
 
                  <? endforeach; ?>
 
202
                  <?php endforeach; ?>
203
203
                </table>
204
204

                                        
205
205
                <p>&nbsp;</p>
213
213
                        <strong><?=i18n('Nickname: ');?></strong>&nbsp;
214
214
                        <input type="text" name="nickname" style="margin-bottom: 5px;width: 200px;" list="ctuseraccounts" autocomplete="off" />
215
215
                        <datalist id="ctuseraccounts">
216
 
                          <? foreach($_ctuserslist as $user): ?>
 
216
                          <?php foreach($_ctuserslist as $user): ?>
217
217
                            <option value="<?=$user;?>">
218
 
                          <? endforeach; ?>
 
218
                          <?php endforeach; ?>
219
219
                        </datalist>
220
220
                      </td>
221
221
                      <td>
222
222
                        <strong><?=i18n('Role: ');?></strong>&nbsp;
223
223
                        <select name="role" style="margin-bottom: 5px;width: 205px;margin-right: 40px;" onchange="javascript:change_role_powers();" id="rolesetter">
224
 
                          <? foreach ($working as $key => $value): ?>
 
224
                          <?php foreach ($working as $key => $value): ?>
225
225
                            <option value="<?=$key;?>"><?=$value;?></option>
226
 
                          <? endforeach; ?>
 
226
                          <?php endforeach; ?>
227
227
                        </select>
228
228
                      </td>
229
229
                      <td>
256
256
                    </p>
257
257
                  </div>
258
258
                </form>
259
 
              <? else: ?>
 
259
              <?php else: ?>
260
260
                <script type="text/javascript">
261
261
                  var powers = <?=$_js_powers;?>
262
262
                </script>
269
269
                    <select name="role" style="margin-bottom: 5px;width: 205px;margin-right: 40px;" onchange="javascript:change_role_powers();" id="rolesetter">
270
270
                      <option value="cur"><?=i18n('Current rights');?></option>
271
271
                      <option disabled="disabled" class="center">–</option>
272
 
                      <? foreach ($working as $key => $value): ?>
 
272
                      <?php foreach ($working as $key => $value): ?>
273
273
                        <option value="<?=$key;?>"><?=$value;?></option>
274
 
                      <? endforeach; ?>
 
274
                      <?php endforeach; ?>
275
275
                    </select>
276
276
                  <p>
277
277

                                        
308
308
                <h2><?=i18n('Current rights');?></h2>
309
309

                                        
310
310
                <table style="width: 100%;">
311
 
                  <? foreach($_powers as $power): ?>
 
311
                  <?php foreach($_powers as $power): ?>
312
312
                    <tr>
313
313
                      <td class="background_minor border_bottom_dotted" style="width: 16px;">
314
314
                        <img src="public/images/accessrights/<?=$power;?>.png" class="powersbuttons" alt="<?=$power;?>'" title="<?=$_access[$power];?>"/>
317
317
                        <em><?=$_access[$power];?></em>
318
318
                      </td>
319
319
                    </tr>
320
 
                  <? endforeach; ?>
 
320
                  <?php endforeach; ?>
321
321
                </table>
322
 
              <? endif; ?>
 
322
              <?php endif; ?>
323
323
            </td>
324
324
          </tr>
325
325
        </tbody>
326
326

                                        

 

Old New Code
116
116

                                        
117
117
              <h2><?=i18n('Upload a file');?></h2>
118
118

                                        
119
 
              <? if (is_string($form_error)): ?>
 
119
              <?php if (is_string($form_error)): ?>
120
120
                <div class="box error"><?=$form_error;?></div>
121
 
              <? endif; ?>
 
121
              <?php endif; ?>
122
122

                                        
123
123
              <form action="<?=getURLByTags($this->page);?>" method="post" enctype="multipart/form-data">
124
124
                <p>
141
141
                  </tr>
142
142
                </thead>
143
143
                <tbody>
144
 
                <? for($i=0; $i<sizeof($files); $i++): ?>
145
 
                <? (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
 
144
                <?php for($i=0; $i<sizeof($files); $i++): ?>
 
145
                <?php (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
146
146
                  <tr>
147
147
                    <td class="<?=$cl;?>" style="width: 16px;"><img src="public/images/icons/document.png" alt="file" /></td>
148
148
                    <td class="<?=$cl;?>"><a href="<?=$files[$i][2];?>"><?=$files[$i][1];?></a></td>
157
157
                      </form>
158
158
                    </td>
159
159
                  </tr>
160
 
                <? endfor; ?>
 
160
                <?php endfor; ?>
161
161
                </tbody>
162
162
              </table>
163
163

                                        
164
164

                                        

 

Old New Code
40
40
          </tr>
41
41
        </tfoot>
42
42
        <tbody>
43
 
          <? if (count($own_projects) > 0): ?>
44
 
            <? foreach ($own_projects as $project): ?>
 
43
          <?php if (count($own_projects) > 0): ?>
 
44
            <?php foreach ($own_projects as $project): ?>
45
45
              <tr>
46
46
                <td style="width: 65%;">
47
47
                  <a href="dashboard/edit/<?=$project['dbname'];?>" title="<?=i18n('Edit this project');?>"><img src="public/images/icons/edit.png" alt="edit" /></a>
48
48
                  <a href="project/<?=$project['dbname'];?>"><strong><?=$project['lname'];?></strong></a>
49
49
                </td>
50
50
              </tr>
51
 
            <? endforeach; ?>
52
 
          <? else: ?>
 
51
            <?php endforeach; ?>
 
52
          <?php else: ?>
53
53
            <tr>
54
54
              <td>
55
55
                <em><?=i18n('There are no projects.');?></em>
56
56
              </td>
57
57
            </tr>
58
 
          <? endif; ?>
 
58
          <?php endif; ?>
59
59
        </tbody>
60
60
      </table>
61
61

                                        
73
73
          </tr>
74
74
        </tfoot>
75
75
        <tbody>
76
 
          <? if (count($contrib_projects) > 0): ?>
77
 
            <? foreach ($contrib_projects as $project): ?>
 
76
          <?php if (count($contrib_projects) > 0): ?>
 
77
            <?php foreach ($contrib_projects as $project): ?>
78
78
              <tr>
79
79
                <td style="width: 65%;">
80
80
                  <a href="dashboard/edit/<?=$project['dbname'];?>" title="<?=i18n('Edit this project');?>"><img src="public/images/icons/edit.png" alt="edit" /></a>
81
81
                  <a href="project/<?=$project['dbname'];?>"><strong><?=$project['lname'];?></strong></a>
82
82
                </td>
83
83
              </tr>
84
 
            <? endforeach; ?>
85
 
          <? else: ?>
 
84
            <?php endforeach; ?>
 
85
          <?php else: ?>
86
86
            <tr>
87
87
              <td>
88
88
                <em><?=i18n('There are no projects.');?></em>
89
89
              </td>
90
90
            </tr>
91
 
          <? endif; ?>
 
91
          <?php endif; ?>
92
92
        </tbody>
93
93
      </table>
94
94

                                        
106
106
          </tr>
107
107
        </tfoot>
108
108
        <tbody>
109
 
          <? if (count($teams) > 0): ?>
110
 
            <? foreach ($teams as $team): ?>
 
109
          <?php if (count($teams) > 0): ?>
 
110
            <?php foreach ($teams as $team): ?>
111
111
              <tr>
112
112
                <td style="width: 65%;">
113
113
                  <a href="teams/create/<?=$team['dbname'];?>" title="<?=i18n('Edit this team');?>"><img src="public/images/icons/edit.png" alt="edit" /></a>
114
114
                  <a href="teams/show/<?=$team['dbname'];?>"><strong><?=$team['name'];?></strong></a>
115
115
                </td>
116
116
              </tr>
117
 
            <? endforeach; ?>
118
 
          <? else: ?>
 
117
            <?php endforeach; ?>
 
118
          <?php else: ?>
119
119
            <tr>
120
120
              <td>
121
121
                <em><?=i18n('There are no teams.');?></em>
122
122
              </td>
123
123
            </tr>
124
 
          <? endif; ?>
 
124
          <?php endif; ?>
125
125
        </tbody>
126
126
      </table>
127
127

                                        
160
160
        <tbody>
161
161
          <tr>
162
162
            <td class="reportbox">
163
 
              <? foreach ($timeline as $output): ?>
 
163
              <?php foreach ($timeline as $output): ?>
164
164
                <h2><?=$output[0];?></h2>
165
165
                <ul class="timeline">
166
 
                  <? foreach ($output[1] as $item): ?>
 
166
                  <?php foreach ($output[1] as $item): ?>
167
167
                    <li class="t-<?=$item['_type'];?>">
168
168
                      <em><?=$item['time'];?></em>
169
169
                      <span class="title"><?=i18n('%(title)s by %(nick)s in %(type)s', array('title' => $item['title'], 'nick' => $item['nick'], 'type' => $item['type']));?></span>
171
171
                      <span class="content"><?=$item['text'];?></span>
172
172
                      <br /><span class="text_minus"><?=$item['idate'];?></span><?=$item['author'];?>
173
173
                    </li>
174
 
                  <? endforeach; ?>
 
174
                  <?php endforeach; ?>
175
175
                </ul>
176
 
              <? endforeach; ?>
 
176
              <?php endforeach; ?>
177
177
            </td>
178
178
          </tr>
179
179
        </tbody>
180
180

                                        

 

Old New Code
110
110
          <tr>
111
111
            <td class="reportbox">
112
112

                                        
113
 
              <? if ($_view == 'default'): ?>
 
113
              <?php if ($_view == 'default'): ?>
114
114

                                        
115
 
                <? if ($has_versions): ?>
 
115
                <?php if ($has_versions): ?>
116
116
                  <table style="width: 100%;">
117
117
                  <thead>
118
118
                    <tr>
124
124
                  </thead>
125
125
                  <tbody>
126
126
                    <tbody>
127
 
                    <? $i = 0; ?>
128
 
                    <? foreach ($all_versions_array as $v): ?>
129
 
                      <? (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
 
127
                    <?php $i = 0; ?>
 
128
                    <?php foreach ($all_versions_array as $v): ?>
 
129
                      <?php (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
130
130
                      <tr>
131
131
                        <td class="border_bottom_dotted <?=$cl;?>" style="width: 70%;"><a href="<?=$v['url'];?>"><strong><?=$v['title'];?></strong></a></td>
132
132
                        <td class="border_bottom_dotted center" style="width: 20%;background-color: #<?=$v['color'];?>;"><?=$v['version'];?></td>
150
150
                          </div>
151
151
                        </td>
152
152
                      </tr>
153
 
                      <? $i ++; ?>
154
 
                    <? endforeach; ?>
 
153
                      <?php $i ++; ?>
 
154
                    <?php endforeach; ?>
155
155
                    </tbody>
156
156
                  </table>
157
 
                <? endif; ?>
 
157
                <?php endif; ?>
158
158

                                        
159
159
                <p>&nbsp;</p>
160
160

                                        
161
161
                <h2><?=i18n('Add a file to download');?></h2>
162
162

                                        
163
 
                <? if ($add_down): ?>
164
 
                  <? if (is_string($form_error)): ?>
 
163
                <?php if ($add_down): ?>
 
164
                  <?php if (is_string($form_error)): ?>
165
165
                    <div class="box error"><?=$form_error;?></div>
166
 
                  <? endif; ?>
 
166
                  <?php endif; ?>
167
167

                                        
168
 
                  <? if (is_string($form_info)): ?>
 
168
                  <?php if (is_string($form_info)): ?>
169
169
                    <div class="box info"><?=$form_info;?></div>
170
 
                  <? endif; ?>
 
170
                  <?php endif; ?>
171
171

                                        
172
172
                  <form action="<?=getURLbyTags($this->page);?>" method="post" enctype="multipart/form-data">
173
173
                    <table style="width: 100%;">
181
181

                                        
182
182
                          <strong><?=i18n('Version: ');?><span style="color: red;">&nbsp;*</span></strong><br />
183
183
                          &nbsp;<select name="version" style="margin-bottom: 8px;width: 205px;margin-right: 40px;">
184
 
                            <? foreach ($add_down_array as $key => $value): ?>
 
184
                            <?php foreach ($add_down_array as $key => $value): ?>
185
185
                              <option value="<?=$key;?>"><?=$value;?></option>
186
 
                            <? endforeach; ?>
 
186
                            <?php endforeach; ?>
187
187
                          </select>
188
188
                        </td>
189
189
                        <td>
207
207
                      </tr>
208
208
                    </table>
209
209
                  </form>
210
 
                <? else: ?>
 
210
                <?php else: ?>
211
211
                  <p>
212
212
                    <?=i18n('This project has no version. You could not add a file!');?>
213
213
                  </p>
214
 
                <? endif; ?>
 
214
                <?php endif; ?>
215
215

                                        
216
 
              <? else: ?>
217
 
                <? if (is_string($form_error)): ?>
 
216
              <?php else: ?>
 
217
                <?php if (is_string($form_error)): ?>
218
218
                  <div class="box error"><?=$form_error;?></div>
219
 
                <? endif; ?>
 
219
                <?php endif; ?>
220
220

                                        
221
 
                <? if (is_string($form_info)): ?>
 
221
                <?php if (is_string($form_info)): ?>
222
222
                  <div class="box info"><?=$form_info;?></div>
223
 
                <? endif; ?>
 
223
                <?php endif; ?>
224
224

                                        
225
225
                <form action="" method="post" enctype="multipart/form-data">
226
226
                  <table style="width: 100%;">
236
236

                                        
237
237
                        <strong><?=i18n('Version: ');?><span style="color: red;">&nbsp;*</span></strong><br />
238
238
                        &nbsp;<select name="version" style="margin-bottom: 8px;width: 205px;margin-right: 40px;">
239
 
                          <? foreach ($versions as $key => $value): ?>
 
239
                          <?php foreach ($versions as $key => $value): ?>
240
240
                            <option value="<?=$key;?>" <?=(($key == $version) ? 'selected="selected"' : '');?>><?=$value;?></option>
241
 
                          <? endforeach; ?>
 
241
                          <?php endforeach; ?>
242
242
                        </select>
243
243
                      </td>
244
244
                      <td>
261
261
                    </tr>
262
262
                  </table>
263
263
                </form>
264
 
              <? endif; ?>
 
264
              <?php endif; ?>
265
265
            </td>
266
266
          </tr>
267
267
        </tbody>
268
268

                                        

 

Old New Code
120
120
          <tr>
121
121
            <td colspan="3" style="vertical-align: top;">
122
122
              <div class="tags" style="width: 500px;display: block;margin-left: auto;margin-right: auto;">
123
 
                <? foreach ($_tags as $tag): ?>
 
123
                <?php foreach ($_tags as $tag): ?>
124
124
                  <p><a href="projects/browse/tags/<?=$tag[0];?>" class="ptag"><span><?=$tag[1];?></span></a></p>
125
 
                <? endforeach; ?>
 
125
                <?php endforeach; ?>
126
126
              </div>
127
127

                                        
128
128
              <hr />
129
129

                                        

 

Old New Code
109
109
        <tbody>
110
110
          <tr>
111
111
            <td class="reportbox">
112
 
              <? if(is_string($form_error)): ?>
 
112
              <?php if(is_string($form_error)): ?>
113
113
                <div class="box error"><?=$form_error;?></div>
114
 
              <? endif; ?>
 
114
              <?php endif; ?>
115
115

                                        
116
116
              <table style="width: 100%;">
117
117
                <tr>
123
123
                        <input type="hidden" name="type" value="import-pot" />
124
124
                        <strong><?=i18n('Base lang: ');?></strong><br />&nbsp;
125
125
                        <select name="lang" style="margin-bottom: 8px;width: 205px;">
126
 
                          <? foreach ($langs as $key => $value): ?>
 
126
                          <?php foreach ($langs as $key => $value): ?>
127
127
                            <option value="<?=$key;?>"><?=$value;?></option>
128
 
                          <? endforeach; ?>
 
128
                          <?php endforeach; ?>
129
129
                        </select><br />
130
130

                                        
131
131
                        <strong><?=i18n('File: ');?></strong><br />&nbsp;
143
143
                        <input type="hidden" name="type" value="import-po" />
144
144
                        <strong><?=i18n('Lang: ');?></strong><br />&nbsp;
145
145
                        <select name="lang" style="margin-bottom: 8px;width: 205px;">
146
 
                          <? foreach ($langs as $key => $value): ?>
 
146
                          <?php foreach ($langs as $key => $value): ?>
147
147
                            <option value="<?=$key;?>"><?=$value;?></option>
148
 
                          <? endforeach; ?>
 
148
                          <?php endforeach; ?>
149
149
                        </select><br />
150
150

                                        
151
151
                        <strong><?=i18n('File: ');?></strong><br />&nbsp;
165
165
                  <input type="hidden" name="type" value="export-po" />
166
166
                  <strong><?=i18n('Lang: ');?></strong><br />&nbsp;
167
167
                  <select name="lang" style="margin-bottom: 8px;width: 205px;">
168
 
                    <? foreach ($exportlangs as $key => $value): ?>
 
168
                    <?php foreach ($exportlangs as $key => $value): ?>
169
169
                      <option value="<?=$key;?>"><?=$value;?></option>
170
 
                    <? endforeach; ?>
 
170
                    <?php endforeach; ?>
171
171
                  </select><br />
172
172

                                        
173
173
                  <input class="submit" type="submit" value="<?=i18n('Export');?>" />
174
174

                                        

 

Old New Code
110
110
          <tr>
111
111
            <td class="reportbox">
112
112

                                        
113
 
              <? if ($_view == 'default'): ?>
 
113
              <?php if ($_view == 'default'): ?>
114
114
                <table style="width: 100%;">
115
115
                  <thead>
116
116
                    <tr>
121
121
                    </tr>
122
122
                  </thead>
123
123
                  <tbody>
124
 
                  <? $i = 0; ?>
125
 
                  <? foreach ($news as $v): ?>
126
 
                    <? (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
 
124
                  <?php $i = 0; ?>
 
125
                  <?php foreach ($news as $v): ?>
 
126
                    <?php (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
127
127
                    <tr>
128
128
                      <td class="border_bottom_dotted <?=$cl;?>" style="width: 60%;"><a href="<?=$v['link'];?>"><strong><?=$v['title'];?></strong></a></td>
129
129
                      <td class="border_bottom_dotted <?=$cl;?> center" style="width: 20%;"><a href="users/show/<?=$v['author'];?>"><?=$v['author'];?></a></td>
147
147
                        </div>
148
148
                      </td>
149
149
                    </tr>
150
 
                    <? $i ++; ?>
151
 
                  <? endforeach; ?>
 
150
                    <?php $i ++; ?>
 
151
                  <?php endforeach; ?>
152
152
                  </tbody>
153
153
                </table>
154
154

                                        
155
155
                <p>&nbsp;</p>
156
156

                                        
157
157
                <h2><?=i18n('Add a new post');?></h2>
158
 
              <? endif; ?>
 
158
              <?php endif; ?>
159
159

                                        
160
160
                <form action="" method="post" id="form">
161
161
                  <p>
162
162

                                        

 

Old New Code
112
112

                                        
113
113
              <table style="width: 100%;">
114
114
                <tbody>
115
 
                <? $i = 0; ?>
116
 
                <? foreach ($screenshots as $v): ?>
117
 
                  <? (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
 
115
                <?php $i = 0; ?>
 
116
                <?php foreach ($screenshots as $v): ?>
 
117
                  <?php (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
118
118
                  <tr>
119
119
                    <td class="border_bottom_dotted <?=$cl;?> center" style="width: 60px;"><a href="<?=$v['image'];?>"><img src="<?=$v['image'];?>" alt="screenshot" style="width: 50px;" /></a></td>
120
120
                    <td class="border_bottom_dotted <?=$cl;?>" style="width: 60%;"><strong><?=$v['name'];?></strong></td>
132
132
                      </div>
133
133
                    </td>
134
134
                  </tr>
135
 
                  <? $i ++; ?>
136
 
                <? endforeach; ?>
 
135
                  <?php $i ++; ?>
 
136
                <?php endforeach; ?>
137
137
                </tbody>
138
138
              </table>
139
139

                                        
141
141

                                        
142
142
              <h2><?=i18n('Add a screenshot');?></h2>
143
143

                                        
144
 
              <? if (!$has_versions): ?>
 
144
              <?php if (!$has_versions): ?>
145
145
                <p><?=i18n(' This project has no version. You could not add a screenshot! ');?></p>
146
 
              <? else: ?>
147
 
                <? if (is_string($form_error)): ?>
 
146
              <?php else: ?>
 
147
                <?php if (is_string($form_error)): ?>
148
148
                  <div class="box error"><?=$form_error;?></div>
149
 
                <? endif; ?>
 
149
                <?php endif; ?>
150
150
              
151
 
                <? if (is_string($form_info)): ?>
 
151
                <?php if (is_string($form_info)): ?>
152
152
                  <div class="box info"><?=$form_info;?></div>
153
 
                <? endif; ?>
 
153
                <?php endif; ?>
154
154

                                        
155
155
                <form action="<?=getURLbyTags($this->page);?>" method="post" enctype="multipart/form-data">
156
156
                  <table style="width: 100%;">
161
161

                                        
162
162
                        <strong><?=i18n('Version: ');?><span style="color: red;">&nbsp;*</span></strong><br />&nbsp;
163
163
                        <select name="version" style="margin-bottom: 8px;width: 205px;margin-right: 40px;">
164
 
                          <? foreach ($versions as $key => $value): ?>
 
164
                          <?php foreach ($versions as $key => $value): ?>
165
165
                            <option value="<?=$key;?>"><?=$value;?></option>
166
 
                          <? endforeach; ?>
 
166
                          <?php endforeach; ?>
167
167
                        </select>
168
168
                      </td>
169
169
                      <td>
184
184
                    </tr>
185
185
                  </table>
186
186
                </form>
187
 
              <? endif; ?>
 
187
              <?php endif; ?>
188
188
            </td>
189
189
          </tr>
190
190
        </tbody>
191
191

                                        

 

Old New Code
110
110
          <tr>
111
111
            <td class="reportbox">
112
112

                                        
113
 
              <? if ($has_versions): ?>
 
113
              <?php if ($has_versions): ?>
114
114

                                        
115
115
                <p><?=i18n('Versions and milestones have to be created in order to add versioned content on your project (releases, screenshots…).');?></p>
116
116

                                        
128
128
                    </tr>
129
129
                  </thead>
130
130
                  <tbody>
131
 
                  <? $i = 0; ?>
132
 
                  <? foreach ($adm_versions as $version): ?>
133
 
                    <? (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
 
131
                  <?php $i = 0; ?>
 
132
                  <?php foreach ($adm_versions as $version): ?>
 
133
                    <?php (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
134
134
                    <form action="<?=getURLbyTags($this->page);?>" method="post">
135
135
                      <tr>
136
136
                        <td class="<?=$cl;?>"><strong><?=$version['version'];?></strong></td>
137
137
                        <td style="width: 160px;background-color: #<?=$colors[$version['status']];?>;" class="center">
138
138
                          <input type="hidden" name="version-currentname" value="<?=$version['version'];?>" />
139
139
                          <select name="status" style="width: 150px;">
140
 
                            <? foreach ($available_status as $key => $value): ?>
 
140
                            <?php foreach ($available_status as $key => $value): ?>
141
141
                              <option value="<?=$key;?>" <?=(($key == $version['status']) ? 'selected="selected"' : '');?>><?=$value;?></option>
142
 
                            <? endforeach; ?>
 
142
                            <?php endforeach; ?>
143
143
                          </select>
144
144
                        </td>
145
145
                        <td class="<?=$cl;?> center" style="width: 100px;">
154
154
                        </td>
155
155
                      </tr>
156
156
                    </form>
157
 
                    <? $i ++; ?>
158
 
                  <? endforeach; ?>
 
157
                    <?php $i ++; ?>
 
158
                  <?php endforeach; ?>
159
159
                  </tbody>
160
160
                </table>
161
 
              <? endif; ?>
 
161
              <?php endif; ?>
162
162

                                        
163
163
          <p>&nbsp;</p>
164
164

                                        
173
173
                <td>
174
174
                  <strong><?=i18n('Status: ');?></strong><br />&nbsp;
175
175
                  <select name="status" style="margin-bottom: 5px;width: 205px;margin-right: 40px;">
176
 
                    <? foreach ($available_status as $key => $value): ?>
 
176
                    <?php foreach ($available_status as $key => $value): ?>
177
177
                      <option value="<?=$key;?>"><?=$value;?></option>
178
 
                    <? endforeach; ?>
 
178
                    <?php endforeach; ?>
179
179
                  </select>
180
180
                </td>
181
181
                <td>
182
182

                                        

 

Old New Code
168
168
              <li class="useractions">
169
169
                <a href="users/messages">
170
170
                  <div id="up_mess_elem">'.(($unread > 0) ? '<span>'.$unread.'</span>' : '').'
171
 
                  </div><i class="fas fa-envelope"></i></li>
 
171
                  </div><i class="fas fa-envelope"></i></a></li>
172
172

                                        
173
173
              <li class="useractions">
174
174
                <a href="dashboard">
175
175

                                        

 

Old New Code
1
 
<? if (is_string($form_previsualise)): ?>
 
1
<?php if (is_string($form_previsualise)): ?>
2
2
  <div style="margin: 5px;padding: 5px;" class="border_top border_bottom border_left border_right">
3
3
    <?=$content;?></div>
4
 
<? endif; ?>
 
4
<?php endif; ?>
5
5

                                        
6
 
<? if (is_string($form_finalize)): ?>
 
6
<?php if (is_string($form_finalize)): ?>
7
7
  <div class="box info"><?=$form_finalize;?></div>
8
 
<? endif; ?>
 
8
<?php endif; ?>
9
9

                                        
10
 
<? if (is_string($form_error)): ?>
 
10
<?php if (is_string($form_error)): ?>
11
11
  <div class="box error"><?=$form_error;?></div>
12
 
<? endif; ?>
 
12
<?php endif; ?>
13
13

                                        
14
14
<form action="<?=getURLbyTags($this->page);?>" method="post" id="form">
15
15
  <p>
16
16

                                        

 

Old New Code
1
 
<? if ($static): ?>
 
1
<?php if ($static): ?>
2
2
  <div class="bigtext">
3
3
    <h1><?=$static['title'];?></h1>
4
4
    <?=$static['content'];?>
5
5
  </div>
6
 
<? endif; ?>
 
6
<?php endif; ?>
7
7

                                        
8
8
<p class="spacer" style="height: 5px;">&nbsp;</p>
9
9

                                        
11
11
<h2><?=$subtitle;?></h2>
12
12

                                        
13
13
<ul class="prettylist_order">
14
 
  <li><a href="index/default<?=$link;?>" class="<? if ($orderby == 'popularity'): ?>current<? endif; ?>"><?=i18n('Trending');?></a></li>
15
 
  <li><a href="index/default<?=$link;?>downloads:desc" class="<? if ($orderby == 'downloads'): ?>current<? endif; ?>"><?=i18n('Most downloaded');?></a></li>
16
 
  <li><a href="index/default<?=$link;?>date:desc" class="<? if ($orderby == 'date'): ?>current<? endif; ?>"><?=i18n('Most recent');?></a></li>
17
 
  <li><a href="index/default<?=$link;?>name:asc" class="<? if ($orderby == 'name'): ?>current<? endif; ?>"><?=i18n('Project name');?></a></li>
 
14
  <li><a href="index/default<?=$link;?>" class="<?php if ($orderby == 'popularity'): ?>current<?php endif; ?>"><?=i18n('Trending');?></a></li>
 
15
  <li><a href="index/default<?=$link;?>downloads:desc" class="<?php if ($orderby == 'downloads'): ?>current<?php endif; ?>"><?=i18n('Most downloaded');?></a></li>
 
16
  <li><a href="index/default<?=$link;?>date:desc" class="<?php if ($orderby == 'date'): ?>current<?php endif; ?>"><?=i18n('Most recent');?></a></li>
 
17
  <li><a href="index/default<?=$link;?>name:asc" class="<?php if ($orderby == 'name'): ?>current<?php endif; ?>"><?=i18n('Project name');?></a></li>
18
18
</ul>
19
19

                                        
20
20
<ul class="prettylist_content">
21
 
<? if ($nb_prj > 0): ?>
22
 
<? foreach ($projects as $project): ?>
 
21
<?php if ($nb_prj > 0): ?>
 
22
<?php foreach ($projects as $project): ?>
23
23
  <li class="prettylist_browsing">
24
24
    <span class="date"><i class="fas fa-clock fa-fw"></i><?=$project['date'];?></span>
25
25
    <span class="download"><i class="fas fa-download fa-fw"></i><?=$project['downloads'];?></span>
31
31
    <span class="text_minus category">
32
32
      <?=$project['categories'];?></span>
33
33
  </li>
34
 
<? endforeach; ?>
35
 
<? else: ?>
 
34
<?php endforeach; ?>
 
35
<?php else: ?>
36
36
<li><em><?=$noproject;?></em></li>
37
 
<? endif; ?>
 
37
<?php endif; ?>
38
38
</ul>
39
39
</div>
40
40

                                        
41
41

                                        

 

Old New Code
1
 
<? if ($static): ?>
 
1
<?php if ($static): ?>
2
2
  <h1><?=$static['title'];?></h1>
3
3
  <?=$static['content'];?>
4
 
<? endif; ?>
 
4
<?php endif; ?>
5
5

                                        

 

Old New Code
345
345
            $construct['nb_prj'] = $projects_list[0];
346
346

                                        
347
347
            // Projects
348
 
            if ($projects_list[0] == 0)
 
348
            $construct['noproject'] = i18n('No project found.');
 
349
            if ($projects_list[0] > 0)
349
350
            {
350
 
                $construct['noproject'] = i18n('No project found.');
351
 
            }
352
 
            else
353
 
            {
354
351
                $construct['projects'] = array();
355
352
                foreach ($projects_list[1] as $project)
356
353
                {
422
419
        return $construct;
423
420
    }
424
421
}
425
 
?>
 
422
?>
426
423

                                        

 

Old New Code
1
 
<? if (!$has_paste): ?>
 
1
<?php if (!$has_paste): ?>
2
2
  <em><?=i18n('Not yet.');?></em>
3
 
<? else: ?>
 
3
<?php else: ?>
4
4

                                        
5
5
  <p class="spacer" style="height: 5px;">&nbsp;</p>
6
6

                                        
17
17
    </ul>
18
18

                                        
19
19
    <ul class="prettylist_content">
20
 
    <? for($i=0; $i<sizeof($list); $i++): ?>
21
 
    <? (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
 
20
    <?php for($i=0; $i<sizeof($list); $i++): ?>
 
21
    <?php (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
22
22
      <li class="prettylist_browsing">
23
23
        <h3><a href="<?=$list[$i]['link'];?>"><?=$list[$i]['title'];?></a></h3>
24
24
        <span><?=$list[$i]['lang'];?></span>
25
25
        <span><?=i18n('Snippet by %(nick)s.', array('nick' => $list[$i]['nick']));?></span>
26
26
      </li>
27
 
    <? endfor; ?>
 
27
    <?php endfor; ?>
28
28
    </ul>
29
29

                                        
30
30
  </div>
31
 
<? endif; ?>
 
31
<?php endif; ?>
32
32

                                        

 

Old New Code
1
1
<h1 style="margin-bottom: 20px;"><?=i18n('Notepad');?></h1>
2
2
<h2><?=i18n('Add a new entrie');?></h2>
3
3

                                        
4
 
<? if (is_string($form_error)): ?>
 
4
<?php if (is_string($form_error)): ?>
5
5
  <div class="box error"><?=$form_error;?></div>
6
 
<? endif; ?>
 
6
<?php endif; ?>
7
7

                                        
8
8
<form action="<?=getURLbyTags($this->page);?>" method="post">
9
9
  <p>
15
15

                                        
16
16
    <strong><?=i18n('Language:');?></strong><br />
17
17
    <select name="language" style="width:205px;">
18
 
    <? foreach($snippet_language as $lang): ?>
 
18
    <?php foreach($snippet_language as $lang): ?>
19
19
      <option value="<?=$lang['key'];?>" <?=(($lang['sel']) ? 'selected="selected"' : '');?>><?=$lang['val'];?></option>
20
 
    <? endforeach; ?>
 
20
    <?php endforeach; ?>
21
21
    </select>
22
22
    <br /><br />
23
23

                                        
24
24
    <strong><?=i18n('Code:');?></strong><br />
25
25
    <textarea name="code" cols="100" rows="20" style="width: 98%;"><?=$snippet_code;?></textarea>
26
26

                                        
27
 
    <? if ($is_logged): ?>
 
27
    <?php if ($is_logged): ?>
28
28
      <input type="hidden" name="nickname" value="" />
29
29
      <br /><br />
30
 
    <? else: ?>
 
30
    <?php else: ?>
31
31
      </p>
32
32
      <div style="margin: 20px;width: 400px;padding-left: 15px;" class="border_left">
33
33
        <strong><?=i18n('Captcha security:');?></strong><br />
37
37
          <input type="text" name="captcha_" value="<?=$captcha[1];?>" class="captcha" />
38
38
        </div><br />
39
39
        <strong><?=i18n('Nickname:');?></strong><br />
40
 
        <input type="text" style="width: 98%;" maxlength="255" name="nickname" value="<? if (!empty($form_nickname)): ?><?=$form_nickname;?><? endif; ?>" />
 
40
        <input type="text" style="width: 98%;" maxlength="255" name="nickname" value="<?php if (!empty($form_nickname)): ?><?=$form_nickname;?><?php endif; ?>" />
41
41
      </div>
42
42
      <p>
43
 
    <? endif; ?>
 
43
    <?php endif; ?>
44
44

                                        
45
45
    <strong><?=i18n('Time available:');?></strong><br />
46
 
    <? if ($ask_time): ?>
 
46
    <?php if ($ask_time): ?>
47
47
      <label>
48
48
        <input type="radio" name="time" value="0" <?=( (empty($form_time) || (!empty($form_time) && $form_time == 'd')) ? 'checked="checked"' : '');?> />
49
49
        <?=i18n('A day');?></label>&nbsp;&nbsp;
54
54

                                        
55
55
      <label><input type="radio" name="time" value="2" <?=( (!empty($form_time) && $form_time == 'f') ? 'checked="checked"' : '');?> />
56
56
        <?=i18n('Forever');?></label>
57
 
    <? else: ?>
 
57
    <?php else: ?>
58
58
      <em><?=i18n('Not available when editing.');?></em>
59
59
      <input type="hidden" name="time" value="2" />
60
 
    <? endif; ?>
 
60
    <?php endif; ?>
61
61

                                        
62
62
    <br /><br />
63
63
    <input class="submit" style="width: 100px;" type="submit" value="<?=i18n('Paste!');?>" />
64
64

                                        

 

Old New Code
1
 
<? if ($paste_exists): ?>
 
1
<?php if ($paste_exists): ?>
2
2
  <div style="float: right;">
3
3
    <a href="paste/download/<?=$id;?>" style="background-image: url('public/images/icons/project-download.png');" class="button"><?=i18n('Download');?></a><br />
4
4
    <a href="paste/new/<?=$id.(($pid != 0) ? '/'.$pid : '');?>" style="background-image: url('public/images/icons/paste-new.png');" class="button"><?=i18n('Edit');?></a>
10
10
    <tr>
11
11
      <td style="width: 20%;"><?=$user_infos;?></td>
12
12
      <td style="vertical-align: top;"><em><?=$date;?></em>
13
 
      <? if ($is_admin): ?>
 
13
      <?php if ($is_admin): ?>
14
14
        <form action="<?=getURLbyTags($this->page);?>" method="post">
15
15
          <p style="padding: 0; margin: 0;">
16
16
            <input type="hidden" name="delete-paste" value="<?=$id;?>" />
17
17
            <input type="submit" value="<?=i18n('Delete this paste');?>" />
18
18
          </p>
19
19
        </form>
20
 
      <? endif; ?>
 
20
      <?php endif; ?>
21
21
      </td>
22
22
    </tr>
23
23
  </table>
24
24

                                        
25
25
  <p class="spacer">&nbsp;</p>
26
26

                                        
27
 
  <? if ($has_parent): ?>
 
27
  <?php if ($has_parent): ?>
28
28
    <div style="background-image: url('public/images/icons/paste.png');" class="button">
29
29
      <strong><?=$parent_title;?></strong> -
30
30
      <a href="<?=$parent_link;?>"><?=i18n('Show');?></a> -
31
31
      <a href="<?=$parent_new;?>"><?=i18n('Edit');?></a> -
32
32
      <a href="<?=$parent_down;?>"><?=i18n('Download');?></a>
33
33
    </div>
34
 
  <? endif; ?>
 
34
  <?php endif; ?>
35
35

                                        
36
 
  <? for($i=0; $i<sizeof($children); $i++): ?>
37
 
  <? (($children[$i]['id'] == $id) ? $cl = 'background_important' : $cl = ''); ?>
 
36
  <?php for($i=0; $i<sizeof($children); $i++): ?>
 
37
  <?php (($children[$i]['id'] == $id) ? $cl = 'background_important' : $cl = ''); ?>
38
38
    <div style="background-image: url('public/images/icons/document.png'); margin-left: 20px;" class="button">
39
39
      <strong class="<?=$cl;?>"><?=$children[$i]['title'];?></strong> -
40
40
      <a href="paste/show/<?=$children[$i]['id'];?>"><?=i18n('Show');?></a> -
41
41
      <a href="paste/new/<?=$children[$i]['id'];?>/<?=$children[$i]['pid'];?>"><?=i18n('Edit');?></a> -
42
42
      <a href="paste/download/<?=$children[$i]['id'];?>"><?=i18n('Download');?></a>
43
43

                                        
44
 
      <? if ($precedent): ?>
 
44
      <?php if ($precedent): ?>
45
45
        - <a href="paste/diff/<?=$precedent;?>"><?=i18n('Differences');?></a>
46
 
      <? endif; ?>
 
46
      <?php endif; ?>
47
47
    </div>
48
 
  <? endfor; ?>
 
48
  <?php endfor; ?>
49
49

                                        
50
50
  <p class="spacer">&nbsp;</p>
51
51

                                        
52
52
  <?=$code;?>
53
53

                                        
54
 
<? else: ?>
 
54
<?php else: ?>
55
55
  <?=i18n('Error: paste not found.');?>
56
 
<? endif; ?>
 
56
<?php endif; ?>
57
57

                                        

 

Old New Code
12
12
  <form class="selectlink">
13
13
    <label><?=i18n('Select another milestone:');?></label>
14
14
    <select id="jscboxurl" name="sel" onChange="window.location=document.getElementById('jscboxurl').value">
15
 
      <? $i = 0; ?>
16
 
      <? foreach ($milestones as $mil): ?>
 
15
      <?php $i = 0; ?>
 
16
      <?php foreach ($milestones as $mil): ?>
17
17
        <option value="project/<?=$_dbname;?>/board<?=(($i > 0) ? '/'.$mil : '');?>" <?=(($milestone == $mil) ? 'selected="seleced"' : '');?>><?=$mil;?></option>
18
 
        <? $i ++; ?>
19
 
      <? endforeach; ?>
 
18
        <?php $i ++; ?>
 
19
      <?php endforeach; ?>
20
20
    </select>
21
21
  </form>
22
22
</div>
31
31
  </thead>
32
32
  <tbody>
33
33
    <tr valign="top">
34
 
    <? foreach(array('todo', 'workinprogress', 'done') as $state): ?>
 
34
    <?php foreach(array('todo', 'workinprogress', 'done') as $state): ?>
35
35
      <td>
36
 
        <? foreach($tickets[$state] as $ticket): ?>
 
36
        <?php foreach($tickets[$state] as $ticket): ?>
37
37
          <div class="board_ticket confirmed">
38
38

                                        
39
39
            <a href="project/<?=$_dbname;?>/bugs/show/<?=$ticket['id'];?>">#<?=$ticket['id'];?></a>
46
46
            <div class="spacer">&nbsp;</div>
47
47
            <em><?=$ticket['date'];?></em>
48
48
            </div>
49
 
          <? endforeach; ?>
 
49
          <?php endforeach; ?>
50
50
        </td>
51
 
    <? endforeach; ?>
 
51
    <?php endforeach; ?>
52
52
    </tr>
53
53
  </tbody>
54
54
</table>
55
55

                                        

 

Old New Code
20
20
        <?=i18n('(%(a)d added, %(d)d deleted and %(m)d modified)', array('a' => count($sum[0]), 'd' => count($sum[1]), 'm' => count($sum[2])));?>
21
21
      </td>
22
22
    </tr>
23
 
    <? if ($is_commit): ?>
 
23
    <?php if ($is_commit): ?>
24
24
    <tr>
25
25
      <td style="padding-left: 10px;width: 20%;vertical-align: top;">
26
26
        <?=i18n('Revision %(rev)s', array('rev' => '<strong>'.$rev.'</strong>'));?><br />
29
29
      </td>
30
30
      <td style="vertical-align: top;padding: 10px;" class="background_title"><?=$c_msg;?></td>
31
31
    </tr>
32
 
    <? endif; ?>
 
32
    <?php endif; ?>
33
33
    <tr>
34
34
      <td colspan="2">
35
35
        <table style="width: 100%;">
44
44
            <tr>
45
45
              <td style="vertical-align: top;">
46
46
                <ul>
47
 
                  <? foreach($sum[0] as $item): ?>
 
47
                  <?php foreach($sum[0] as $item): ?>
48
48
                    <li><a href="project/<?=$dbname;?>/browse<?=$item;?>/?rev=<?=$next_rev;?>"><?=$item;?></a></li>
49
 
                  <? endforeach; ?>
 
49
                  <?php endforeach; ?>
50
50
                </ul>
51
51
              </td>
52
52
              <td style="vertical-align: top;">
53
53
                <ul>
54
 
                  <? foreach($sum[1] as $item): ?>
 
54
                  <?php foreach($sum[1] as $item): ?>
55
55
                    <li><a href="project/<?=$dbname;?>/browse<?=$item;?>/?rev=<?=$prev_rev;?>"><?=$item;?></a></li>
56
 
                  <? endforeach; ?>
 
56
                  <?php endforeach; ?>
57
57
                </ul>
58
58
              </td>
59
59
              <td style="vertical-align: top;">
60
60
                <ul>
61
 
                  <? $i = 0; ?>
62
 
                  <? foreach($sum[2] as $item): ?>
63
 
                    <? $i ++; ?>
 
61
                  <?php $i = 0; ?>
 
62
                  <?php foreach($sum[2] as $item): ?>
 
63
                    <?php $i ++; ?>
64
64
                    <li class="modifiedfiles">
65
65
                      <a href="project/<?=$dbname;?>/browse<?=$item;?>/?rev=<?=$next_rev;?>"><?=$item;?></a>
66
66
                      <span class="anchor"><a href="<?=getURLByTags($this->page);?>#file<?=$i;?>">↓</a></span>
67
67
                    </li>
68
 
                  <? endforeach; ?>
 
68
                  <?php endforeach; ?>
69
69
                </ul>
70
70
              </td>
71
71
            </tr>
76
76
  </tbody>
77
77
</table>
78
78

                                        
79
 
<? $i = 0; ?>
80
 
<? foreach($sum[2] as $item): ?>
81
 
  <? if (isset($diff[$item])): ?>
82
 
  <? $i ++; ?>
 
79
<?php $i = 0; ?>
 
80
<?php foreach($sum[2] as $item): ?>
 
81
  <?php if (isset($diff[$item])): ?>
 
82
  <?php $i ++; ?>
83
83
    <p>&nbsp;</p>
84
84
    <div class="fstree">
85
85
      <ul>
86
86
        <li class="dir" id="file<?=$i;?>">
87
87
          <a href="project/<?=$dbname;?>/browse/?rev=<?=$next_rev;?>">/</a>
88
88
        </li>
89
 
        <? foreach ($tags[$item] as $key => $value): ?>
90
 
          <? ((end($tags[$item]) == $value) ? $cl = 'current' : $cl = ''); ?>
 
89
        <?php foreach ($tags[$item] as $key => $value): ?>
 
90
          <?php ((end($tags[$item]) == $value) ? $cl = 'current' : $cl = ''); ?>
91
91
          <li class="<?=((end($tags[$item]) == $value) ? 'file' : 'dir');?> <?=$cl;?>">
92
92
            <a href="project/<?=$dbname;?>/browse<?=$value;?>/?rev=<?=$next_rev;?>"><?=$key;?></a>
93
93
          </li>
94
 
        <? endforeach; ?>
 
94
        <?php endforeach; ?>
95
95
      </ul>
96
96
    </div>
97
97

                                        
107
107
        <?=$diff[$item];?>
108
108
      </tbody>
109
109
    </table>
110
 
  <? endif; ?>
111
 
<? endforeach; ?>
 
110
  <?php endif; ?>
 
111
<?php endforeach; ?>
112
112

                                        

 

Old New Code
1
1
<h1><?=i18n('Browse the code');?></h1>
2
2

                                        
3
 
<? foreach ($tags as $key => $value): ?> <? endforeach; ?>
 
3
<?php foreach ($tags as $key => $value): ?> <?php endforeach; ?>
4
4

                                        
5
5
<table style="width: 80%;margin-left: auto;margin-right: auto;" class="border_left border_right border_top border_bottom">
6
6
  <thead>
20
20

                                        
21
21
        <p class="spacer">&nbsp;</p>
22
22

                                        
23
 
        <? if ($rev > 0): ?>
 
23
        <?php if ($rev > 0): ?>
24
24
          <a href="project/<?=$dbname;?>/browse/diff/<?=($rev - 1);?>/<?=$rev;?><?=$value;?>" style="background-image: url('public/images/icons/project-code-diff.png');background-repeat: no-repeat;min-height: 16px;display: block;padding-left: 20px;"><?=i18n('Show the differences');?></a>
25
 
        <? endif; ?>
 
25
        <?php endif; ?>
26
26

                                        
27
27
        <form action="<?=getURLByTags($this->page);?>/" method="get">
28
28
          <div>
32
32
        </form>
33
33
      </td>
34
34
      <td style="width: 40%;vertical-align: top;padding: 10px;" class="background_title">
35
 
        <? if ($rev > 0): ?>
 
35
        <?php if ($rev > 0): ?>
36
36
          <?=$l_msg;?>
37
 
        <? else: ?>
 
37
        <?php else: ?>
38
38
          -
39
 
        <? endif; ?>
 
39
        <?php endif; ?>
40
40
      </td>
41
41
      <td style="width: 40%;vertical-align: top;">
42
42
        <?=i18n('You can get the sources via %(scm)s.', array('scm' => '<strong>'.$_scm_type.'</strong>'));?><br />
57
57
    <li class="dir">
58
58
      <a href="project/<?=$dbname;?>/browse<?=$linkr;?>">/</a>
59
59
    </li>
60
 
    <? foreach ($tags as $key => $value): ?>
61
 
      <? ((end($tags) == $value) ? $cl = 'file current' : $cl = 'dir'); ?>
 
60
    <?php foreach ($tags as $key => $value): ?>
 
61
      <?php ((end($tags) == $value) ? $cl = 'file current' : $cl = 'dir'); ?>
62
62
      <li class="<?=$cl;?>">
63
63
        <a href="project/<?=$dbname;?>/browse<?=$value;?><?=$linkr;?>"><?=$key;?></a>
64
64
      </li>
65
 
    <? endforeach; ?>
 
65
    <?php endforeach; ?>
66
66
  </ul>
67
67
</div>
68
68

                                        
69
 
<? if (!$is_binary): ?>
 
69
<?php if (!$is_binary): ?>
70
70
  <?=$code;?>
71
 
<? elseif ($is_binary && !isset($message)): ?>
 
71
<?php elseif ($is_binary && !isset($message)): ?>
72
72
  <img src="<?=$img;?>" alt="<?=$value;?>" style="max-width: 100%;" />
73
 
<? else: ?>
 
73
<?php else: ?>
74
74
  <?=$message;?>
75
 
<? endif; ?>
 
75
<?php endif; ?>
76
76

                                        

 

Old New Code
18
18

                                        
19
19
        <p class="spacer">&nbsp;</p>
20
20

                                        
21
 
        <? if ($rev > 0): ?>
 
21
        <?php if ($rev > 0): ?>
22
22
          <a href="project/<?=$dbname;?>/browse/diff/<?=($rev - 1);?>/<?=$rev;?><?=(isset($value) ? $value : '/');?>" style="background-image: url('public/images/icons/project-code-diff.png');background-repeat: no-repeat;min-height: 16px;display: block;padding-left: 20px;"><?=i18n('Show the differences');?></a>
23
 
        <? endif; ?>
 
23
        <?php endif; ?>
24
24

                                        
25
25
        <form action="<?=getURLByTags($this->page);?>/" method="get">
26
26
          <div>
30
30
        </form>
31
31
      </td>
32
32
      <td style="width: 40%;vertical-align: top;padding: 10px;" class="background_title">
33
 
        <? if (isset($l_msg)): ?>
 
33
        <?php if (isset($l_msg)): ?>
34
34
          <?=$l_msg;?>
35
 
        <? else: ?>
 
35
        <?php else: ?>
36
36
          -
37
 
        <? endif; ?>
 
37
        <?php endif; ?>
38
38
      </td>
39
39
      <td style="width: 40%;vertical-align: top;">
40
40
        <?=i18n('You can get the sources via %(scm)s.', array('scm' => '<strong>'.$_scm_type.'</strong>'));?><br />
51
51
    <li class="dir">
52
52
      <a href="project/<?=$dbname;?>/browse<?=$linkr;?>">/</a>
53
53
    </li>
54
 
    <? foreach ($tags as $key => $value): ?>
55
 
      <? ((end($tags) == $value) ? $cl = 'current' : $cl = ''); ?>
 
54
    <?php foreach ($tags as $key => $value): ?>
 
55
      <?php ((end($tags) == $value) ? $cl = 'current' : $cl = ''); ?>
56
56
      <li class="dir <?=$cl;?>">
57
57
        <a href="project/<?=$dbname;?>/browse<?=$value;?><?=$linkr;?>"><?=$key;?></a>
58
58
      </li>
59
 
    <? endforeach; ?>
 
59
    <?php endforeach; ?>
60
60
  </ul>
61
61
</div>
62
62

                                        
71
71
    </tr>
72
72
  </thead>
73
73
  <tbody>
74
 
    <? if (!$content): ?>
 
74
    <?php if (!$content): ?>
75
75
      <tr>
76
76
        <td colspan="6"><?=i18n('This directory is empty or not exist at this revision.');?></td>
77
77
      </tr>
78
 
    <? else: ?>
79
 
      <? for($i=0; $i<sizeof($ls); $i++): ?>
80
 
      <? (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
 
78
    <?php else: ?>
 
79
      <?php for($i=0; $i<sizeof($ls); $i++): ?>
 
80
      <?php (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
81
81
        <tr class="<?=$cl;?>">
82
82
          <td style="width: 16px;"><img src="<?=$ls[$i]['img'];?>" alt="<?=$ls[$i]['type'];?>"/></td>
83
83
          <td><a href="project/<?=$dbname;?>/browse/<?=$links;?><?=$ls[$i]['name'];?><?=$linkr;?>" style="display: block;"><?=$ls[$i]['name'];?></a></td>
84
84
          <td class="center">
85
 
            <? if ($ls[$i]['type'] == 'file'): ?>
 
85
            <?php if ($ls[$i]['type'] == 'file'): ?>
86
86
              <?=$ls[$i]['size'];?>
87
 
            <? else: ?>
 
87
            <?php else: ?>
88
88
              -
89
 
            <? endif; ?>
 
89
            <?php endif; ?>
90
90
          </td>
91
91
          <td class="center"><?=$ls[$i]['last_rev'];?></td>
92
92
          <td class="center"><?=$ls[$i]['last_date'];?></td>
93
93
          <td class="center"><a href="users/show/<?=$ls[$i]['last_author'];?>"><?=$ls[$i]['last_author'];?></a></td>
94
94
        </tr>
95
 
      <? endfor; ?>
96
 
    <? endif; ?>
 
95
      <?php endfor; ?>
 
96
    <?php endif; ?>
97
97
  </tbody>
98
98
</table>
99
99

                                        

 

Old New Code
1
1
<h1><?=i18n('Browse the code');?></h1>
2
2

                                        
3
 
<? if ($root): ?>
 
3
<?php if ($root): ?>
4
4
  <div class="feed"><?=$feed;?></div>
5
 
<? endif; ?>
 
5
<?php endif; ?>
6
6

                                        
7
7
<p class="spacer">&nbsp;</p>
8
8

                                        
11
11
    <li class="dir">
12
12
      <a href="project/<?=$dbname;?>/browse">/</a>
13
13
    </li>
14
 
    <? foreach ($tags as $key => $value): ?>
15
 
      <? ((end($tags) == $value) ? $cl = 'current' : $cl = ''); ?>
 
14
    <?php foreach ($tags as $key => $value): ?>
 
15
      <?php ((end($tags) == $value) ? $cl = 'current' : $cl = ''); ?>
16
16
      <li class="<?=((end($tags) == $value) ? $type : 'dir');?> <?=$cl;?>">
17
17
        <a href="project/<?=$dbname;?>/browse<?=$value;?>"><?=$key;?></a>
18
18
      </li>
19
 
    <? endforeach; ?>
 
19
    <?php endforeach; ?>
20
20
  </ul>
21
21
</div>
22
22

                                        
31
31
    </tr>
32
32
  </thead>
33
33
  <tbody>
34
 
    <? for($i=0; $i<sizeof($log); $i++): ?>
35
 
    <? (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
 
34
    <?php for($i=0; $i<sizeof($log); $i++): ?>
 
35
    <?php (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
36
36
      <tr class="<?=$cl;?>">
37
37
        <td class="center">
38
38
          <a href="project/<?=$dbname;?>/browse<?=$value;?>/?rev=<?=$log[$i]['rev'];?>"><?=((strlen($log[$i]['rev']) == 40) ? mb_substr($log[$i]['rev'], 0, 7) : $log[$i]['rev']);?></a>
51
51
          <?=$log[$i]['msg'];?>
52
52
        </td>
53
53
      </tr>
54
 
    <? endfor; ?>
 
54
    <?php endfor; ?>
55
55
  </tbody>
56
56
</table>
57
57

                                        

 

Old New Code
4
4

                                        
5
5
<h2><?=i18n('Report a bug');?></h2>
6
6

                                        
7
 
<? if (is_string($form_error)): ?>
 
7
<?php if (is_string($form_error)): ?>
8
8
  <div class="box error"><?=$form_error;?></div>
9
 
<? endif; ?>
 
9
<?php endif; ?>
10
10

                                        
11
11
<form action="<?=getURLbyTags($this->page);?>" method="post" id="form">
12
12
  <p>
17
17
    <select style="width:205px;margin-bottom: 10px;" name="version">
18
18
      <option value="" <?=(($sel_version == '') ? 'selected="selected"' : '');?>><?=_('No version')?></option>
19
19
      <option disabled="disabled" class="center">–</option>
20
 
      <? foreach ($versions as $version): ?>
 
20
      <?php foreach ($versions as $version): ?>
21
21
        <option value="<?=$version['version'];?>" <?=(($sel_version == $version['version']) ? 'selected="selected"' : '');?>><?=$version['version'];?> (<?=$available_status[$version['status']];?>)</option>
22
 
      <? endforeach; ?>
 
22
      <?php endforeach; ?>
23
23
    </select><br />
24
24

                                        
25
25
    <strong><?=i18n('Report type:');?></strong><br />
26
26
    <select style="width:205px;margin-bottom: 10px;" name="type">
27
 
      <? foreach ($type as $key => $value): ?>
 
27
      <?php foreach ($type as $key => $value): ?>
28
28
        <option value="<?=$key;?>" <?=(($sel_type == $key) ? 'selected="selected"' : '');?>><?=$value;?></option>
29
 
      <? endforeach; ?>
 
29
      <?php endforeach; ?>
30
30
    </select><br />
31
31

                                        
32
32
    <strong><?=i18n('Describe the bug:');?></strong><br />
33
33
    <?=$txt;?><br />
34
34

                                        
35
 
    <? if(!$is_logged): ?>
 
35
    <?php if(!$is_logged): ?>
36
36
      <div style="margin: 20px;width: 400px;padding-left: 15px;" class="border_left">
37
37
        <strong><?=i18n('Captcha security:');?></strong><br />
38
38
        <?=i18n('In order to check you are not a robot, please answer to that simple question:');?><br />
48
48
        <br /><strong><?=i18n('Nickname:');?></strong><br />
49
49
        <input type="text" style="width: 98%;" maxlength="255" name="nickname" value="<?=$form_nick;?>" />
50
50
      </div>
51
 
    <? endif; ?>
 
51
    <?php endif; ?>
52
52

                                        
53
53
    <input class="submit" type="submit" value="<?=i18n('Report this bug!');?>" />
54
54
  </p>
55
55

                                        

 

Old New Code
33
33

                                        
34
34
            <label><input type="checkbox" name="assignedto" value="1" <?=((isset($filter['assignedto'])) ? 'checked="checked"' : '');?> >&nbsp;<?=i18n('Assigned to:');?></label>
35
35
            <select name="assignedusers" style="width: 150px;">
36
 
              <? foreach ($adminslist as $key => $value): ?>
 
36
              <?php foreach ($adminslist as $key => $value): ?>
37
37
                <option <?=((isset($filter['assignedusers']) && $key == $filter['assignedusers']) ? 'selected="selected"' : '');?> value="<?=$key;?>" >&nbsp;<?=$value;?></option>
38
 
              <? endforeach; ?>
 
38
              <?php endforeach; ?>
39
39
            </select>
40
40
          </td>
41
41
        </tr>
58
58
            <input type="text" name="text" value="<?=((isset($filter['text'])) ? htmlspecialchars($filter['text']) : '');?>" />
59
59
          </td>
60
60
        </tr>
61
 
        <? if(!empty($versions)): ?>
 
61
        <?php if(!empty($versions)): ?>
62
62
          <tr>
63
63
            <td style="vertical-align: top;">
64
64
              <strong><?=i18n('Version:');?></strong><br />
66
66
              <select name="version">
67
67
                <option <?=((isset($filter['version']) && '' == $filter['version']) ? 'selected="selected"' : '');?> value=""><?=_('No version')?></option>
68
68
                <option disabled="disabled" class="center">–</option>
69
 
                <? foreach ($versions as $version): ?>
 
69
                <?php foreach ($versions as $version): ?>
70
70
                  <option <?=((isset($filter['version']) && $version['version'] == $filter['version']) ? 'selected="selected"' : '');?> value="<?=$version['version'];?>">&nbsp;<?=$version['version'];?></option>
71
 
                <? endforeach; ?>
 
71
                <?php endforeach; ?>
72
72
              </select>
73
73
            </td>
74
74
            <td style="vertical-align: top;">
77
77
              <select name="milestone">
78
78
                <option <?=((isset($filter['milestone']) && '' == $filter['milestone']) ? 'selected="selected"' : '');?> value=""><?=_('No milestone')?></option>
79
79
                <option disabled="disabled" class="center">–</option>
80
 
                <? foreach ($versions as $version) : ?>
 
80
                <?php foreach ($versions as $version) : ?>
81
81
                  <option <?=((isset($filter['milestone']) && $version['version'] == $filter['milestone']) ? 'selected="selected"' : '');?> value="<?=$version['version'];?>">&nbsp;<?=$version['version'];?></option>
82
 
                <? endforeach; ?>
 
82
                <?php endforeach; ?>
83
83
              </select>
84
84
            </td>
85
85
          </tr>
86
 
        <? endif; ?>
 
86
        <?php endif; ?>
87
87
      </table>
88
88

                                        
89
89
      <p>
194
194
    </tr>
195
195
  </tfoot>
196
196
  <tbody>
197
 
    <? for($i=0; $i<sizeof($bugs); $i++): ?>
198
 
    <? (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
 
197
    <?php for($i=0; $i<sizeof($bugs); $i++): ?>
 
198
    <?php (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
199
199
      <tr>
200
200
        <td class="center <?=$cl;?>" style="font-weight: bold;">
201
201
          <a href="project/<?=$_dbname;?>/bugs/show/<?=$bugs[$i]['id'];?>">#<?=$bugs[$i]['id'];?></a>
202
202
        </td>
203
203
        <td style="padding: 5px;" class="<?=$cl;?>">
204
 
          <? if ($bugs[$i]['type'] == 'featurerequest'): ?>
 
204
          <?php if ($bugs[$i]['type'] == 'featurerequest'): ?>
205
205
            <img src="public/images/icons/project-bug-feature.png" title="<?=i18n('Feature request');?>" alt="<?=i18n('Feature request');?>" style="float: right;padding-left: 5px;" />
206
 
          <? endif; ?>
 
206
          <?php endif; ?>
207
207

                                        
208
 
          <? if ($bugs[$i]['has_attachements']): ?>
 
208
          <?php if ($bugs[$i]['has_attachements']): ?>
209
209
            <img src="public/images/icons/content.png" title="<?=i18n('Attachement');?>" alt="<?=i18n('Attachement');?>" style="float: right;padding-left: 5px;" />
210
 
          <? endif; ?>
 
210
          <?php endif; ?>
211
211

                                        
212
 
          <? if ($bugs[$i]['status'] == 'unconfirmed'): ?>
 
212
          <?php if ($bugs[$i]['status'] == 'unconfirmed'): ?>
213
213
            <img src="public/images/icons/question.png" title="<?=i18n('Unconfirmed');?>" alt="<?=i18n('Unconfirmed');?>" style="float: right;padding-left: 5px;" />
214
 
          <? elseif ($bugs[$i]['status'] == 'resolved'): ?>
 
214
          <?php elseif ($bugs[$i]['status'] == 'resolved'): ?>
215
215
            <img src="public/images/icons/ok.png" title="<?=i18n('Resolved and closed');?>" alt="<?=i18n('Resolved and closed');?>" style="float: right;padding-left: 5px;" />
216
 
          <? endif; ?>
 
216
          <?php endif; ?>
217
217

                                        
218
 
          <? if (in_array($bugs[$i]['priority'], array('blocker', 'critical'))): ?>
 
218
          <?php if (in_array($bugs[$i]['priority'], array('blocker', 'critical'))): ?>
219
219
            <img src="public/images/icons/alert.png" title="<?=$_priority[$bugs[$i]['priority']];?>" alt="<?=$bugs[$i]['priority'];?>" style="float: right;padding-left: 5px;" />
220
 
          <? endif; ?>
 
220
          <?php endif; ?>
221
221

                                        
222
222
          <a href="project/<?=$_dbname;?>/bugs/show/<?=$bugs[$i]['id'];?>" style="display: block;"><?=$bugs[$i]['name'];?></a>
223
223
        </td>
231
231
            <?=( (!empty($bugs[$i]['version'])) ? '<a href="project/'.$_dbname.'/bugs/?nbbugs=30&amp;withversion=1&amp;version='.$bugs[$i]['version'].'">'.$bugs[$i]['version'].'</a>' : 'n/a' );?>
232
232
        </td>
233
233
      </tr>
234
 
    <? endfor; ?>
 
234
    <?php endfor; ?>
235
235
  </tbody>
236
236
</table>
237
237

                                        

 

Old New Code
1
1
<h1><?=i18n('Bug tracking');?></h1>
2
2

                                        
3
 
<? if ($is_projectadmin): ?>
4
 
  <? if (is_string($form_error)): ?>
 
3
<?php if ($is_projectadmin): ?&gt;
 
4
  <?php if (is_string($form_error)): ?>
5
5
    <div class="box error"><?=$form_error;?></div>
6
 
  <? endif; ?>
7
 
<? endif; ?>
 
6
  <?php endif; ?>
 
7
<?php endif; ?>
8
8

                                        
9
9
<div class="feed" style="font-weight: normal;float: right;"><?=$feed;?></div>
10
10

                                        
11
11
<p class="spacer" style="clear: both;height: 0px;">&nbsp;</p>
12
12

                                        
13
13
<table style="margin-top: 20px;width: 100%;" class="border_top border_bottom border_left border_right">
14
 
<? if ($is_projectadmin): ?>
 
14
<?php if ($is_projectadmin): ?>
15
15
  <form action="<?=getURLbyTags($this->page);?>" method="post">
16
 
<? endif; ?>
 
16
<?php endif; ?>
17
17
  <thead>
18
18
    <tr>
19
19
      <th colspan="4" style="padding: 5px;font-size: 1.1em;"><a href="project/<?=$_dbname;?>/bugs/show/<?=$_bugid;?>">#<?=$_bugid;?></a> – <?=$name;?></th>
26
26

                                        
27
27
    <td style="padding-left: 5px;width: 17%;" class="background_title text_title"><?=i18n('Type:');?></td>
28
28
    <td style="padding-left: 5px;width: 33%;" class="background_title">
29
 
      <? if ($is_projectadmin): ?>
 
29
      <?php if ($is_projectadmin): ?>
30
30
        <select name="type" style="width: 205px;margin: 0px;">
31
 
          <? foreach ($_type as $key => $value): ?>
32
 
            <? if ($key == $bugtype): ?>
 
31
          <?php foreach ($_type as $key => $value): ?>
 
32
            <?php if ($key == $bugtype): ?>
33
33
              <option value="<?=$key;?>" selected="selected"><?=$value;?></option>
34
 
            <? else: ?>
 
34
            <?php else: ?>
35
35
              <option value="<?=$key;?>"><?=$value;?></option>
36
 
            <? endif; ?>
37
 
          <? endforeach; ?>
 
36
            <?php endif; ?>
 
37
          <?php endforeach; ?>
38
38
        </select>
39
 
      <? else: ?>
 
39
      <?php else: ?>
40
40
        <?=$_type[$bugtype];?>
41
 
      <? endif; ?>
 
41
      <?php endif; ?>
42
42
    </td>
43
43
  </tr>
44
44
  <tr>
45
45
    <td style="padding-left: 5px;" class="background_title text_title"><?=i18n('Status:');?></td>
46
46
    <td style="padding-left: 5px;font-weight: bold;" class="background_title">
47
 
      <? if ($is_projectadmin): ?>
 
47
      <?php if ($is_projectadmin): ?>
48
48
        <select name="status" style="width: 205px;margin: 0px;">
49
 
          <? foreach ($_status as $key => $value): ?>
50
 
            <? if ($key == $bugstatus): ?>
 
49
          <?php foreach ($_status as $key => $value): ?>
 
50
            <?php if ($key == $bugstatus): ?>
51
51
              <option value="<?=$key;?>" selected="selected"><?=$value;?></option>
52
 
            <? else: ?>
 
52
            <?php else: ?>
53
53
              <option value="<?=$key;?>"><?=$value;?></option>
54
 
            <? endif; ?>
55
 
          <? endforeach;?>
 
54
            <?php endif; ?>
 
55
          <?php endforeach;?>
56
56
        </select>
57
 
      <? else: ?>
 
57
      <?php else: ?>
58
58
        <?=$_status[$bugstatus];?>
59
 
      <? endif; ?>
 
59
      <?php endif; ?>
60
60
    </td>
61
61

                                        
62
62
    <td style="padding-left: 5px;" class="background_title text_title"><?=i18n('Priority:');?></td>
63
63
    <td style="padding-left: 5px;font-weight: bold;color: #<?=$colors[$bugpriority];?>;" class="background_title">
64
 
      <? if ($is_projectadmin): ?>
 
64
      <?php if ($is_projectadmin): ?>
65
65
        <select name="priority" style="width: 205px;margin: 0px;">
66
 
          <? foreach ($_priority as $key => $value): ?>
67
 
            <? if ($key == $bugpriority): ?>
 
66
          <?php foreach ($_priority as $key => $value): ?>
 
67
            <?php if ($key == $bugpriority): ?>
68
68
              <option value="<?=$key;?>" selected="selected"><?=$value;?></option>
69
 
            <? else: ?>
 
69
            <?php else: ?>
70
70
              <option value="<?=$key;?>"><?=$value;?></option>
71
 
            <? endif; ?>
72
 
          <? endforeach; ?>
 
71
            <?php endif; ?>
 
72
          <?php endforeach; ?>
73
73
        </select>
74
74
        &#x25CF;
75
 
      <? else: ?>
 
75
      <?php else: ?>
76
76
        <?=$_priority[$bugpriority];?>
77
 
      <? endif; ?>
 
77
      <?php endif; ?>
78
78
    </td>
79
79
  </tr>
80
80
  <tr>
81
81
    <td style="padding-left: 5px;" class="background_title text_title"><?=i18n('Affected version:');?></td>
82
82
    <td style="padding-left: 5px;" class="background_title">
83
 
      <? if ($is_projectadmin): ?>
 
83
      <?php if ($is_projectadmin): ?>
84
84
        <select name="version" style="width: 205px;margin: 0px;">
85
 
          <? foreach ($versions as $key): ?>
86
 
            <? if ($key['version'] == $adm_version): ?>
 
85
          <?php foreach ($versions as $key): ?>
 
86
            <?php if ($key['version'] == $adm_version): ?>
87
87
              <option value="<?=$key['version'];?>" selected="selected"><?=$key['version'];?> (<?=$available_status[$key['status']];?>)</option>
88
 
            <? else: ?>
 
88
            <?php else: ?>
89
89
              <option value="<?=$key['version'];?>"><?=$key['version'];?> (<?=$available_status[$key['status']];?>)</option>
90
 
            <? endif; ?>
91
 
          <? endforeach; ?>
 
90
            <?php endif; ?>
 
91
          <?php endforeach; ?>
92
92
        </select>
93
 
      <? else: ?>
 
93
      <?php else: ?>
94
94
        <?=(!empty($version) ? '<a href="project/'.$_dbname.'/bugs/?nbbugs=30&amp;withversion=1&amp;version='.$version.'">'.$version.'</a>' : '<em>n/a</em>');?>
95
 
      <? endif; ?>
 
95
      <?php endif; ?>
96
96
    </td>
97
97
    <td style="padding-left: 5px;" class="background_title text_title"><?=i18n('Milestone:');?></td>
98
98
    <td style="padding-left: 5px;" class="background_title">
99
 
      <? if ($is_projectadmin): ?>
 
99
      <?php if ($is_projectadmin): ?>
100
100
        <select name="milestone" style="width: 205px;margin: 0px;">
101
 
          <? foreach ($milestones as $key): ?>
102
 
            <? if ($key['version'] == $adm_milestone): ?>
 
101
          <?php foreach ($milestones as $key): ?>
 
102
            <?php if ($key['version'] == $adm_milestone): ?>
103
103
              <option value="<?=$key['version'];?>" selected="selected"><?=$key['version'];?> (<?=$available_status[$key['status']];?>)</option>
104
 
            <? else: ?>
 
104
            <?php else: ?>
105
105
              <option value="<?=$key['version'];?>"><?=$key['version'];?> (<?=$available_status[$key['status']];?>)</option>
106
 
            <? endif; ?>
107
 
          <? endforeach; ?>
 
106
            <?php endif; ?>
 
107
          <?php endforeach; ?>
108
108
        </select>
109
 
      <? else: ?>
 
109
      <?php else: ?>
110
110
        <?=(!empty($milestone) ? '<a href="project/'.$_dbname.'/roadmap">'.$milestone.'</a>' : '<em>n/a</em>');?>
111
 
      <? endif; ?>
 
111
      <?php endif; ?>
112
112
    </td>
113
113
  </tr>
114
114
  <tr>
117
117

                                        
118
118
    <td style="padding-left: 5px;" class="background_title text_title"><?=i18n('Assigned to:');?></td>
119
119
    <td style="padding-left: 5px;" class="background_title">
120
 
      <? if ($is_projectadmin): ?>
 
120
      <?php if ($is_projectadmin): ?>
121
121
        <select name="assignto" style="width: 205px;margin: 0px;">
122
 
          <? foreach ($_admins as $admin): ?>
123
 
            <? if ($admin[0] == $curassign): ?>
 
122
          <?php foreach ($_admins as $admin): ?>
 
123
            <?php if ($admin[0] == $curassign): ?>
124
124
              <option value="<?=$admin[0];?>" selected="selected"><?=$admin[1];?></option>
125
 
            <? else: ?>
 
125
            <?php else: ?>
126
126
              <option value="<?=$admin[0];?>"><?=$admin[1];?></option>
127
 
            <? endif; ?>
128
 
          <? endforeach; ?>
 
127
            <?php endif; ?>
 
128
          <?php endforeach; ?>
129
129
        </select>
130
 
      <? else: ?>
 
130
      <?php else: ?>
131
131
        <?=$assigned_nick;?>
132
 
      <? endif; ?>
 
132
      <?php endif; ?>
133
133
    </td>
134
134
  </tr>
135
 
<? if ($is_projectadmin): ?>
 
135
<?php if ($is_projectadmin): ?>
136
136
  <tr>
137
137
    <td style="padding-left: 5px;" class="background_title text_title"><?=i18n('Save changes:');?></td>
138
138
    <td style="padding-left: 5px;" class="background_title">
150
150
      </form>
151
151
    </td>
152
152
  </tr>
153
 
<? endif; ?>
 
153
<?php endif; ?>
154
154
  <tr>
155
155
    <td colspan="4" class="border_top_light">
156
156
      <div style="display: table;table-layout: fixed;width: 100%;padding: 10px;">
160
160
      </div>
161
161
    </td>
162
162
  </tr>
163
 
  <? if (count($attachements) == 0 && $bugstatus == 'rejected'): ?>
164
 
  <? else: ?>
 
163
  <?php if (count($attachements) == 0 && $bugstatus == 'rejected'): ?>
 
164
  <?php else: ?>
165
165
  <tr>
166
166
    <td style="padding-left: 5px;width: 17%;vertical-align: top;" class="background_title text_title"><?=i18n('Attachements:');?></td>
167
167
    <td style="padding: 0;padding-left: 5px;width: 33%;vertical-align: top;" class="border_top_light" colspan="3">
169
169
        <tr>
170
170
          <td style="width: 60%;vertical-align: top;padding-right: 10px;padding-top: 0px;">
171
171
            <table class="bugs-attachements" style="width: 100%;margin: 0;">
172
 
              <? foreach ($attachements as $attach): ?>
 
172
              <?php foreach ($attachements as $attach): ?>
173
173
                <tr>
174
174
                  <td class="logo <?=$attach['cl'];?>" style="width: 16px;"><img src="<?=$attach['icon'];?>" alt="attachement" /></td>
175
175
                  <td class="<?=$attach['cl'];?>">
177
177
                    <span class="text_minus"><?=i18n('Added on %(date)s', array('date' => '<em>'.$attach['date'].'</em>'));?></span>
178
178
                  </td>
179
179

                                        
180
 
                  <? if ($is_projectadmin): ?>
 
180
                  <?php if ($is_projectadmin): ?>
181
181
                    <td class="delete <?=$attach['cl'];?>" style="width: 20px;">
182
182
                      <form action="<?=getURLbyTags($this->page);?>" method="post">
183
183
                        <p style="padding:0;margin:0;">
187
187
                        </p>
188
188
                      </form>
189
189
                    </td>
190
 
                  <? endif; ?>
 
190
                  <?php endif; ?>
191
191
                </tr>
192
 
              <? endforeach; ?>
 
192
              <?php endforeach; ?>
193
193
            </table>
194
194
          </td>
195
195
          <td style="width: 50%;vertical-align: top;padding-left: 10px;font-size: 0.90em;" class="border_left">
196
 
            <? if ($is_logged && $bugstatus != 'rejected'): ?>
 
196
            <?php if ($is_logged && $bugstatus != 'rejected'): ?>
197
197
              <form action="<?=getURLbyTags($this->page);?>" enctype="multipart/form-data" method="post">
198
198
                <p style="margin: 0;">
199
199
                  <strong><?=i18n('Add a file:');?></strong><br />
209
209
                  <input type="submit" class="submit" value="<?=i18n('Ok');?>" />
210
210
                </p>
211
211
              </form>
212
 
            <? endif; ?>
 
212
            <?php endif; ?>
213
213
          </td>
214
214
        </tr>
215
215
      </table>
216
216
    </td>
217
217
  </tr>
218
 
  <? endif; ?>
 
218
  <?php endif; ?>
219
219
</tbody>
220
220
</table>
221
221

                                        
222
222

                                        
223
 
<? foreach ($h_log as $event): ?>
 
223
<?php foreach ($h_log as $event): ?>
224
224

                                        
225
 
  <? if ($event['answer']): ?>
 
225
  <?php if ($event['answer']): ?>
226
226
    <table style="width: 100%;margin-top: 20px;" class="border_top border_bottom border_left border_right" id="a<?=$event['answer']['id'];?>">
227
227
      <tr>
228
228
        <td style="padding-left: 10px;width: 100%;height: 30px;" class="background_important" colspan="2">
234
234
        <td style="padding-left: 5px;width: 25%;vertical-align: top;" class="border_right">
235
235
          <?=$event['answer']['user_infos'];?>
236
236

                                        
237
 
          <? if ($is_projectadmin): ?>
 
237
          <?php if ($is_projectadmin): ?>
238
238
            <form action="<?=getURLbyTags($this->page);?>" method="post">
239
239
              <p style="margin-top: 10px;margin-left: 2px;">
240
240
                <input type="hidden" name="delete-answer" value="<?=$event['answer']['id'];?>" />
242
242
                 onclick="javascript: return confirm('<?=i18n('Do you really want to delete this answer?');?>');" />
243
243
              </p>
244
244
            </form>
245
 
          <? endif; ?>
 
245
          <?php endif; ?>
246
246
        </td>
247
247
        <td style="padding-left: 5px;width: 75%;vertical-align: top;">
248
248
          <div style="display: table;table-layout: fixed;width: 100%;">
253
253
        </td>
254
254
      </tr>
255
255
    </table>
256
 
  <? else: ?>
 
256
  <?php else: ?>
257
257
    <table style="width: 100%;margin-top: 20px;" class="border_top border_bottom border_left border_right">
258
258
      <tr>
259
259
        <td style="padding-left: 10px;width: 100%;height: 30px;" class="background_important" colspan="2">
268
268
        </td>
269
269
      </tr>
270
270
    </table>
271
 
  <? endif; ?>
 
271
  <?php endif; ?>
272
272

                                        
273
 
<? endforeach; ?>
 
273
<?php endforeach; ?>
274
274

                                        
275
 
<? if ($bugstatus == 'rejected'): ?>
 
275
<?php if ($bugstatus == 'rejected'): ?>
276
276
  <table style="width: 100%;margin-top: 20px;" class="border_top border_bottom border_left border_right">
277
277
    <tr>
278
278
      <td style="padding-left: 10px;width: 100%;height: 30px;" class="background_important text_title" colspan="2">
280
280
      </td>
281
281
    </tr>
282
282
  </table>
283
 
<? elseif ($bugstatus == 'resolved'): ?>
 
283
<?php elseif ($bugstatus == 'resolved'): ?>
284
284
  <table style="width: 100%;margin-top: 20px;" class="border_top border_bottom border_left border_right">
285
285
    <tr>
286
286
      <td style="padding-left: 10px;width: 100%;height: 30px;" class="background_important text_title" colspan="2">
288
288
      </td>
289
289
    </tr>
290
290
  </table>
291
 
<? endif ;?>
 
291
<?php endif ;?>
292
292

                                        
293
293
<table style="width: 100%;margin-top: 20px;" class="border_top border_bottom border_left border_right">
294
294
  <tr>
298
298
  </tr>
299
299
  <tr>
300
300
    <td style="padding-left: 5px;width: 100%;vertical-align: top;">
301
 
      <? if (in_array($bugstatus, array('rejected', 'resolved'))): ?>
 
301
      <?php if (in_array($bugstatus, array('rejected', 'resolved'))): ?>
302
302

                                        
303
303
        <p>
304
304
          <strong><?=i18n('This bug report has been closed by a developer.');?></strong><br />
310
310
        </script>
311
311

                                        
312
312
        <noscript><hr /></noscript>
313
 
      <? endif; ?>
 
313
      <?php endif; ?>
314
314

                                        
315
315
      <div<?=((in_array($bugstatus, array('rejected', 'resolved'))) ? ' id="formconf"' : '');?>>
316
 
        <? if (is_string($form_error)): ?>
 
316
        <?php if (is_string($form_error)): ?>
317
317
          <div class="box error"><?=$form_error;?></div>
318
 
        <? endif; ?>
 
318
        <?php endif; ?>
319
319

                                        
320
320
        <form action="<?=getURLbyTags($this->page);?>" method="post" id="form">
321
321
          <p>
327
327
            <strong><?=i18n('Message:');?></strong><br />
328
328
            <?=$textview;?><br /><br />
329
329

                                        
330
 
            <? if(!$is_logged): ?>
 
330
            <?php if(!$is_logged): ?>
331
331
              <div style="margin: 20px;width: 400px;padding-left: 15px;" class="border_left">
332
332
                <strong><?=i18n('Captcha security:');?></strong><br />
333
333
                <?=i18n('In order to check you are not a robot, please answer to that simple question:');?><br />
343
343
                <br /><strong><?=i18n('Nickname:');?></strong><br />
344
344
                <input type="text" style="width: 98%;" maxlength="255" name="nickname" value="<?=$form_nick;?>" />
345
345
              </div>
346
 
            <? endif; ?>
 
346
            <?php endif; ?>
347
347

                                        
348
348
            <input class="submit" type="submit" value="<?=i18n('Send!');?>" />
349
349
          </p>
350
350

                                        

 

Old New Code
37
37
      <td style="width: 34%;vertical-align: top;">
38
38
        <p>
39
39
          <strong><?=i18n('Language(s): ');?></strong><br />
40
 
          <? $i = 1; ?>
41
 
          <? foreach ($_languages as $lang): ?>
42
 
            <a href="index/default/language/<?=$lang[0];?>"><?=$lang[1];?></a><? if ($i != count($_languages)): ?>,<? endif; ?>
43
 
            <? $i ++; ?>
44
 
          <? endforeach; ?>
 
40
          <?php $i = 1; ?>
 
41
          <?php foreach ($_languages as $lang): ?>
 
42
            <a href="index/default/language/<?=$lang[0];?>"><?=$lang[1];?></a><?php if ($i != count($_languages)): ?>,<?php endif; ?>
 
43
            <?php $i ++; ?>
 
44
          <?php endforeach; ?>
45
45
        </p>
46
46
      </td>
47
47
      <td style="width: 33%;vertical-align: top;">
48
48
        <p>
49
49
          <strong><?=i18n('Available translation(s): ');?></strong><br />
50
 
          <? $i = 1; ?>
51
 
          <? foreach ($_translations as $lang): ?>
52
 
            <a href="index/default/translation/<?=$lang[0];?>"><?=$lang[1];?></a><? if ($i != count($_translations)): ?>,<? endif; ?>
53
 
            <? $i ++; ?>
54
 
          <? endforeach; ?>
 
50
          <?php $i = 1; ?>
 
51
          <?php foreach ($_translations as $lang): ?>
 
52
            <a href="index/default/translation/<?=$lang[0];?>"><?=$lang[1];?></a><?php if ($i != count($_translations)): ?>,<?php endif; ?>
 
53
            <?php $i ++; ?>
 
54
          <?php endforeach; ?>
55
55
        </p>
56
56
      </td>
57
57
      <td style="width: 33%;vertical-align: top;">
58
58
        <p>
59
59
          <strong><?=i18n('Targeted system(s): ');?></strong><br />
60
 
          <? if (is_string($_systems)): ?>
 
60
          <?php if (is_string($_systems)): ?>
61
61
            <a href="index/default/system/all"><?=$_systems;?></a>
62
 
          <? else: ?>
63
 
            <? $i = 1; ?>
64
 
            <? foreach ($_systems as $system): ?>
65
 
              <a href="index/default/system/<?=$system[0];?>"><?=$system[1];?></a><? if ($i != count($_systems)): ?>,<? endif; ?>
66
 
              <? $i ++; ?>
67
 
            <? endforeach; ?>
68
 
          <? endif; ?>
 
62
          <?php else: ?>
 
63
            <?php $i = 1; ?>
 
64
            <?php foreach ($_systems as $system): ?>
 
65
              <a href="index/default/system/<?=$system[0];?>"><?=$system[1];?></a><?php if ($i != count($_systems)): ?>,<?php endif; ?>
 
66
              <?php $i ++; ?>
 
67
            <?php endforeach; ?>
 
68
          <?php endif; ?>
69
69
        </p>
70
70
      </td>
71
71
    </tr>
79
79
      <td style="width: 66%;vertical-align: top;" colspan="2">
80
80
        <p><strong><?=i18n('Tags:');?></strong></p>
81
81
        <div class="tags">
82
 
          <? foreach ($_tags as $tag): ?>
 
82
          <?php foreach ($_tags as $tag): ?>
83
83
            <p><a href="index/default/tags/<?=$tag[0];?>"><i class="fas fa-tag fa-fw"></i><span><?=$tag[1];?></span></a></p>
84
 
          <? endforeach; ?>
 
84
          <?php endforeach; ?>
85
85
        </div>
86
86
      </td>
87
87
    </tr>
93
93
        </p>
94
94
      </td>
95
95
      <td style="width: 66%;vertical-align: top;" colspan="2" rowspan="2">
96
 
        <? if ($has_screenshots): ?>
 
96
        <?php if ($has_screenshots): ?>
97
97
          <p><strong><?=i18n('Screenshots: ');?></strong></p>
98
98
          <p class="spacer">&nbsp;</p>
99
99

                                        
100
 
          <? foreach ($screenshots as $version): ?>
101
 
            <? foreach ($version[1] as $screenshot): ?>
 
100
          <?php foreach ($screenshots as $version): ?>
 
101
            <?php foreach ($version[1] as $screenshot): ?>
102
102
              <div class="screenshot-box">
103
103
                <a href="<?=$screenshot['image'];?>" title="<?=$screenshot['name'];?>"><img src="<?=$screenshot['image'];?>" alt="<?=$screenshot['name'];?>" /></a>
104
104
              </div>
105
 
            <? endforeach; ?>
106
 
          <? endforeach; ?>
107
 
        <? endif; ?>
 
105
            <?php endforeach; ?>
 
106
          <?php endforeach; ?>
 
107
        <?php endif; ?>
108
108
      </td>
109
109
    </tr>
110
110
    <tr>
111
111
      <td style="width: 34%;vertical-align: top;">
112
 
        <? if (!empty($_website)): ?>
 
112
        <?php if (!empty($_website)): ?>
113
113
          <p>
114
114
            <strong><?=i18n('Website: ');?></strong><br />
115
115
            <a href="<?=$_website;?>"><?=$_website;?></a>
116
116
          </p>
117
 
        <? endif; ?>
 
117
        <?php endif; ?>
118
118
      </td>
119
119
    </tr>
120
120
  </table>
124
124

                                        
125
125
  <h2 style="margin-top: -5px;"><?=i18n('Get involved');?></h2>
126
126
  <ul class="actiontools">
127
 
    <? if ($donation): ?>
 
127
    <?php if ($donation): ?>
128
128
      <li><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=<?=$donation['id'];?>&amp;item_name=<?=$_name;?>%20Donation&amp;no_shipping=1&amp;no_note=1&amp;tax=0&amp;currency_code=<?=$donation['cur'];?>&amp;bn=PP%2dDonationsBF&amp;charset=UTF%2d8">
129
129
        <i class="fas fa-credit-card fa-fw"></i><?=i18n('Make a donation');?></a></li>
130
 
    <? endif; ?>
131
 
    <? if ($_feat_act['bugs']): ?>
 
130
    <?php endif; ?>
 
131
    <?php if ($_feat_act['bugs']): ?>
132
132
      <li><a href="project/<?=$_dbname;?>/bugs/add"><i class="fas fa-bug fa-fw"></i><?=i18n('Report a bug');?></a></li>
133
 
    <? endif; ?>
134
 
    <? if ($_feat_act['forum']): ?>
 
133
    <?php endif; ?>
 
134
    <?php if ($_feat_act['forum']): ?>
135
135
      <li><a href="project/<?=$_dbname;?>/forum/add"><i class="fas fa-comments fa-fw"></i><?=i18n('Post a new topic');?></a></li>
136
 
    <? endif; ?>
137
 
    <? if ($_feat_act['i18n']): ?>
 
136
    <?php endif; ?>
 
137
    <?php if ($_feat_act['i18n']): ?>
138
138
      <li><a href="project/<?=$_dbname;?>/i18n"><i class="fas fa-globe-africa fa-fw"></i><?=i18n('Help translate');?></a></li>
139
 
    <? endif; ?>
140
 
    <? if ($_feat_act['browse']): ?>
 
139
    <?php endif; ?>
 
140
    <?php if ($_feat_act['browse']): ?>
141
141
      <li><a href="project/<?=$_dbname;?>/browse"><i class="fas fa-terminal fa-fw"></i><?=i18n('Get the sources');?></a></li>
142
 
    <? endif; ?>
 
142
    <?php endif; ?>
143
143
  </ul>
144
144

                                        
145
 
  <? if (count($teams) > 0): ?>
 
145
  <?php if (count($teams) > 0): ?>
146
146
    <p class="spacer">&nbsp;</p>
147
147

                                        
148
148
    <h2><?=i18n('Related teams');?></h2>
149
149
    <table style="width: 100%;">
150
150

                                        
151
 
    <? foreach ($teams as $team): ?>
 
151
    <?php foreach ($teams as $team): ?>
152
152
      <tr>
153
153
        <td><div class="simple-avatar"><img src="<?=$team['logo'];?>" alt="<?=$team['dbname'];?>" /><a href="teams/show/<?=$team['dbname'];?>"><strong><?=$team['name'];?></strong></a></div></td>
154
154
      </tr>
155
 
    <? endforeach; ?>
 
155
    <?php endforeach; ?>
156
156
    </table>
157
 
  <? endif; ?>
 
157
  <?php endif; ?>
158
158

                                        
159
159
  <p class="spacer">&nbsp;</p>
160
160

                                        
164
164
      <td style="width: 65%;"><?=$_userprofile;?></td>
165
165
      <td><?=i18n('Project leader');?></td>
166
166
    </tr>
167
 
    <? foreach ($admins as $admin): ?>
 
167
    <?php foreach ($admins as $admin): ?>
168
168
      <tr>
169
169
        <td><?=$admin['user'];?></td>
170
170
        <td><?=$admin['role'];?></td>
171
171
      </tr>
172
 
    <? endforeach; ?>
 
172
    <?php endforeach; ?>
173
173
  </table>
174
174

                                        
175
175
  <p class="spacer" style="height: 25px;">&nbsp;</p>
176
176

                                        

 

Old New Code
2
2
<h2>Edit <?=$pagename;?></h2>
3
3

                                        
4
4
<form action="<?=getURLbyTags($this->page);?>" method="post" id="form">
5
 
  <? if (is_string($form_error)): ?>
 
5
  <?php if (is_string($form_error)): ?>
6
6
    <div class="box error"><?=$form_error;?></div>
7
 
  <? endif; ?>
 
7
  <?php endif; ?>
8
8

                                        
9
 
  <? if(is_string($form_previsualise)): ?>
 
9
  <?php if(is_string($form_previsualise)): ?>
10
10
    <div style="margin: 5px;padding: 5px;" class="border_top border_bottom border_left border_right">
11
11
      <?=$form_previsualise;?></div>
12
 
  <? endif; ?>
 
12
  <?php endif; ?>
13
13

                                        
14
14
  <p>
15
15
    <strong><?=i18n('Page content:');?></strong><br />
19
19
    <input type="text" name="log" style="width: 300px;" value="<?=$form_log;?>" />
20
20
  <p>
21
21

                                        
22
 
  <? if(!$is_logged): ?>
 
22
  <?php if(!$is_logged): ?>
23
23
    <div style="margin: 20px;width: 400px;padding-left: 15px;" class="border_left">
24
24
      <strong><?=i18n('Captcha security:');?></strong><br />
25
25
      <?=i18n('In order to check you are not a robot, please answer to that simple question:');?><br />
35
35
      <br /><strong><?=i18n('Nickname:');?></strong><br />
36
36
      <input type="text" style="width: 98%;" maxlength="255" name="nickname" value="<?=$form_nick;?>" />
37
37
    </div>
38
 
  <? endif; ?>
 
38
  <?php endif; ?>
39
39

                                        
40
 
  <? if ($is_projectadmin): ?>
 
40
  <?php if ($is_projectadmin): ?>
41
41
    <div style="margin: 20px;width: 280px;padding-left: 15px;" class="border_left">
42
42
      <strong><?=i18n('Select the rule for this page:');?></strong><br />
43
43
      <select name="rule">
47
47
          <?=i18n('Only projects admins can edit this page');?></option>
48
48
      </select>
49
49
    </div>
50
 
  <? endif; ?>
 
50
  <?php endif; ?>
51
51

                                        
52
52
  <p>
53
53
    <input name="previsualise" type="submit" class="submit" value="<?=i18n('Preview');?>" />
54
54

                                        

 

Old New Code
12
12
    </tr>
13
13
  </thead>
14
14
  <tbody>
15
 
    <? for($i=0; $i<sizeof($log); $i++): ?>
16
 
    <? (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
 
15
    <?php for($i=0; $i<sizeof($log); $i++): ?>
 
16
    <?php (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
17
17
      <tr>
18
18
        <td class="current-td center">
19
19
          <a href="project/<?=$_dbname;?>/doc/<?=$pagename;?>:<?=$log[$i]['time'];?>"><?=$log[$i]['date'];?></a>
20
20
        </td>
21
21
        <td class="<?=$cl;?> center"><?=$log[$i]['nick'];?></td>
22
22
        <td class="<?=$cl;?>">
23
 
          <? if ($i != (count($log) - 1)): ?>
 
23
          <?php if ($i != (count($log) - 1)): ?>
24
24
            <a href="project/<?=$_dbname;?>/doc/diff/<?=$pagename;?>:<?=$log[$i + 1]['time'];?>:<?=$log[$i]['time'];?>"><?=i18n('Differences');?></a> -
25
 
          <? endif; ?>
 
25
          <?php endif; ?>
26
26
          <em><?=$log[$i]['log'];?></em>
27
27
        </td>
28
28
      </tr>
29
 
    <? endfor; ?>
 
29
    <?php endfor; ?>
30
30
  </tbody>
31
31
</table>
32
32

                                        

 

Old New Code
6
6
  <a href="project/<?=$_dbname;?>/doc/edit/<?=$pagename;?>" style="background-image: url('public/images/icons/edit.png');height: 18px;display: block;" class="button"><?=i18n('Edit this page');?></a>
7
7
  <a href="project/<?=$_dbname;?>/doc/log/<?=$pagename;?>" style="background-image: url('public/images/icons/content.png');height: 18px;display: block;" class="button"><?=i18n('Revision history');?></a>
8
8

                                        
9
 
  <? if ($wikimenu): ?>
 
9
  <?php if ($wikimenu): ?>
10
10
    <div style="font-size: 0.8em;margin-top: 10px;">
11
11
      <h3><?=i18n('Page menu');?></h3>
12
12
      <ul>
13
13
        <?=$wikimenu;?>
14
14
      </ul>
15
15
    </div>
16
 
  <? endif; ?>
 
16
  <?php endif; ?>
17
17
</div>
18
18

                                        
19
19
<div style="min-height: 100px;">
20
 
  <? if (!$islatest): ?>
 
20
  <?php if (!$islatest): ?>
21
21
    <div class="border_left border_right border_top border_bottom background_important" style="width: 60%;margin: 10px;padding: 10px;">
22
22
      <?=i18n('Warning: The page you are currently viewing is not the last revision. To view the current version, %(link)s.', 
23
23
         array('link' => '<a href="project/'.$_dbname.'/doc/'.$pagename.'">'.i18n('click here').'</a>'));?>
24
24
    </div>
25
 
  <? endif; ?>
 
25
  <?php endif; ?>
26
26

                                        
27
27
  <div style="padding: 0px 5px 20px 5px;"><?=$content;?></div>
28
28

                                        
29
 
  <? if (!$islatest): ?>
 
29
  <?php if (!$islatest): ?>
30
30
    <br />
31
31
    <textarea cols="100" rows="20" style="margin-top: 20px;width: 98%;"><?=$contentsource;?></textarea>
32
 
  <? endif; ?>
 
32
  <?php endif; ?>
33
33
</div>
34
34

                                        
35
35
<div style="margin-top: 10px;" class="border_top">&nbsp;</div>
36
36

                                        

 

Old New Code
1
1
<h1><?=i18n('Download');?></h1>
2
2

                                        
3
3
<div class="feed"><?=$feed;?></div>
4
 
  <? if ($has_version): ?>
 
4
  <?php if ($has_version): ?>
5
5

                                        
6
 
    <? $vid = 0; ?>
7
 
    <? foreach ($all_versions_array as $version => $downloads): ?>
 
6
    <?php $vid = 0; ?>
 
7
    <?php foreach ($all_versions_array as $version => $downloads): ?>
8
8

                                        
9
 
      <? if ($vid == 0): ?>
 
9
      <?php if ($vid == 0): ?>
10
10
        <div class="prettylist_box">
11
11
          <h2 style="overflow: visible;"><?=i18n('Last available version: %(v)s', array('v' => $version));?>
12
12
            <span class="version_tag" style="background-color: #<?=$downloads[0]['color'];?>;">
16
16
          </h2>
17
17

                                        
18
18
          <ul class="prettylist_content">
19
 
            <? $i = 0; ?>
20
 
            <? foreach ($downloads[1] as $v): ?>
 
19
            <?php $i = 0; ?>
 
20
            <?php foreach ($downloads[1] as $v): ?>
21
21
              <li class="prettylist_browsing">
22
22
                <span class="date"><i class="fas fa-clock fa-fw"></i><?=$v['date'];?></span>
23
 
                <? if ($v['size'] != '-'): ?>
 
23
                <?php if ($v['size'] != '-'): ?>
24
24
                  <span class="date"><i class="fas fa-file-archive fa-fw"></i><?=$v['size'];?></span>
25
 
                <? endif; ?>
 
25
                <?php endif; ?>
26
26
                <span class="download"><i class="fas fa-download fa-fw"></i><?=$v['number'];?></span>
27
27

                                        
28
28
                <h4><a href="<?=$v['url'];?>"><?=$v['title'];?></a></h4>
29
 
                <? if ($v['hash'] != '-'): ?>
 
29
                <?php if ($v['hash'] != '-'): ?>
30
30
                  <span class="second"><?=i18n('Hash (MD5): %(hash)s', array('hash' => '<em>'.$v['hash'].'</em>'));?></span>
31
 
                <? endif; ?>
 
31
                <?php endif; ?>
32
32
                <span class="desc"><?=$v['text'];?></span>
33
33
              </li>
34
 
              <? $i ++; ?>
35
 
            <? endforeach; ?>
 
34
              <?php $i ++; ?>
 
35
            <?php endforeach; ?>
36
36
          </ul>
37
37
        </div>
38
 
      <? elseif ($vid == 1): ?>
 
38
      <?php elseif ($vid == 1): ?>
39
39
          <h2><?=i18n('Older versions available');?></h2>
40
 
      <? endif; ?>
 
40
      <?php endif; ?>
41
41

                                        
42
 
      <? if ($vid > 0): ?>
 
42
      <?php if ($vid > 0): ?>
43
43
        <div class="prettylist_box">
44
44
          <h2 style="overflow: visible;"><a href="project/<?=$_dbname;?>/download#null" onclick="javascript:hideorshow('<?=$version;?>');"><?=$version;?></a>
45
45
            <span class="version_tag" style="background-color: #<?=$downloads[0]['color'];?>;">
49
49
          </h2>
50
50

                                        
51
51
          <ul class="prettylist_content" id="down<?=$version;?>">
52
 
            <? $i = 0; ?>
53
 
            <? foreach ($downloads[1] as $v): ?>
 
52
            <?php $i = 0; ?>
 
53
            <?php foreach ($downloads[1] as $v): ?>
54
54
              <li class="prettylist_browsing">
55
55
                <span class="date"><i class="fas fa-clock fa-fw"></i><?=$v['date'];?></span>
56
 
                <? if ($v['size'] != '-'): ?>
 
56
                <?php if ($v['size'] != '-'): ?>
57
57
                  <span class="date"><i class="fas fa-file-archive fa-fw"></i><?=$v['size'];?></span>
58
 
                <? endif; ?>
 
58
                <?php endif; ?>
59
59
                <span class="download"><i class="fas fa-download fa-fw"></i><?=$v['number'];?></span>
60
60

                                        
61
61
                <h4><a href="<?=$v['url'];?>"><?=$v['title'];?></a></h4>
62
 
                <? if ($v['hash'] != '-'): ?>
 
62
                <?php if ($v['hash'] != '-'): ?>
63
63
                  <span class="second"><?=i18n('Hash (MD5): %(hash)s', array('hash' => '<em>'.$v['hash'].'</em>'));?></span>
64
 
                <? endif; ?>
 
64
                <?php endif; ?>
65
65
                <span class="desc"><?=$v['text'];?></span>
66
66
              </li>
67
 
              <? $i ++; ?>
68
 
            <? endforeach; ?>
 
67
              <?php $i ++; ?>
 
68
            <?php endforeach; ?>
69
69
          </ul>
70
70
        </div>
71
 
      <? endif; ?>
 
71
      <?php endif; ?>
72
72

                                        
73
 
      <? $vid ++; ?>
74
 
    <? endforeach; ?>
 
73
      <?php $vid ++; ?>
 
74
    <?php endforeach; ?>
75
75

                                        
76
 
  <? else: ?>
 
76
  <?php else: ?>
77
77
    <em><?=i18n('This project has no version. You could not download it!');?></em>
78
 
  <? endif; ?>
 
78
  <?php endif; ?>
79
79

                                        
80
80
<script type="text/javascript">
81
81
function onload()
82
82

                                        

 

Old New Code
1
1
<h1><?=i18n('Forum');?></h1>
2
2

                                        
3
 
<? if ($_action == 'add'): ?>
 
3
<?php if ($_action == 'add'): ?>
4
4
  <h2><?=i18n('Post a new topic');?></h2>
5
 
<? else: ?>
 
5
<?php else: ?>
6
6
  <h2><?=i18n('Edit a topic');?></h2>
7
 
<? endif; ?>
 
7
<?php endif; ?>
8
8

                                        
9
 
<? if (is_string($form_error)): ?>
 
9
<?php if (is_string($form_error)): ?>
10
10
  <div class="box error"><?=$form_error;?></div>
11
 
<? endif; ?>
 
11
<?php endif; ?>
12
12

                                        
13
13
<form action="<?=getURLbyTags($this->page);?>" method="post" id="form">
14
14
  <p>
18
18

                                        
19
19
    <strong><?=i18n('Category:');?></strong><br />
20
20
    <select name="cat" style="width: 305px;">
21
 
      <? foreach ($_categories as $catkey => $catvalue): ?>
22
 
        <? if ($form_cat == $catkey): ?>
 
21
      <?php foreach ($_categories as $catkey => $catvalue): ?>
 
22
        <?php if ($form_cat == $catkey): ?>
23
23
          <option value="<?=$catkey;?>" selected="selected"><?=$catvalue;?></option>
24
 
        <? else: ?>
 
24
        <?php else: ?>
25
25
          <option value="<?=$catkey;?>"><?=$catvalue;?></option>
26
 
        <? endif; ?>
27
 
      <? endforeach; ?>
 
26
        <?php endif; ?>
 
27
      <?php endforeach; ?>
28
28
    </select>
29
29
    <br /><br />
30
30

                                        
32
32
    <?=$textview;?>
33
33
  </p>
34
34

                                        
35
 
  <? if (!$is_logged): ?>
 
35
  <?php if (!$is_logged): ?>
36
36
    <div style="margin: 20px;width: 400px;padding-left: 15px;" class="border_left">
37
37
      <strong><?=i18n('Captcha security:');?></strong><br />
38
38
      <?=i18n('In order to check you are not a robot, please answer to that simple question:');?><br />
47
47
      <strong><?=i18n('Nickname:');?></strong><br />
48
48
      <input type="text" style="width: 98%;" maxlength="255" name="nickname" value="<?=$form_nick;?>" />
49
49
    </div>
50
 
  <? endif; ?>
 
50
  <?php endif; ?>
51
51

                                        
52
52
  <p>
53
53
    <br />
54
54

                                        

 

Old New Code
1
1
<h1><?=i18n('Forum');?></h1>
2
2

                                        
3
 
<? if ($_action == 'edit'): ?>
 
3
<?php if ($_action == 'edit'): ?>
4
4
  <h2><?=i18n('Edit a reply');?></h2>
5
 
<? else: ?>
 
5
<?php else: ?>
6
6
  <h2><?=i18n('Post a new reply');?></h2>
7
 
<? endif; ?>
 
7
<?php endif; ?>
8
8

                                        
9
 
<? if (is_string($form_error)): ?>
 
9
<?php if (is_string($form_error)): ?>
10
10
  <div class="box error"><?=$form_error;?></div>
11
 
<? endif; ?>
 
11
<?php endif; ?>
12
12

                                        
13
13
<form action="<?=getURLbyTags($this->page);?>" method="post" id="form">
14
14
  <p>
16
16
    <?=$textview;?>
17
17
  </p>
18
18

                                        
19
 
  <? if (!$is_logged): ?>
 
19
  <?php if (!$is_logged): ?>
20
20
    <div style="margin: 20px;width: 400px;padding-left: 15px;" class="border_left">
21
21
      <strong><?=i18n('Captcha security:');?></strong><br />
22
22
      <?=i18n('In order to check you are not a robot, please answer to that simple question:');?><br />
31
31
      <strong><?=i18n('Nickname:');?></strong><br />
32
32
      <input type="text" style="width: 98%;" maxlength="255" name="nickname" value="<?=$form_nick;?>" />
33
33
    </div>
34
 
  <? endif; ?>
 
34
  <?php endif; ?>
35
35

                                        
36
36
  <p>
37
37
    <br />
38
38

                                        

 

Old New Code
24
24
    </tr>
25
25
  </tfoot>
26
26
  <tbody>
27
 
    <? if (sizeof($topics) > 0): ?>
28
 
      <? for($i=0; $i<sizeof($topics); $i++): ?>
29
 
      <? (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
 
27
    <?php if (sizeof($topics) > 0): ?>
 
28
      <?php for($i=0; $i<sizeof($topics); $i++): ?>
 
29
      <?php (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
30
30
        <tr>
31
31
          <td class="<?=$cl;?>">
32
32
            <a href="project/<?=$_dbname;?>/forum/show/<?=$topics[$i]['id'];?>">
33
 
              <? if (!$topics[$i]['is_open']): ?>
 
33
              <?php if (!$topics[$i]['is_open']): ?>
34
34
                <span style="text-decoration: line-through;font-weight: bold;"><?=$topics[$i]['title'];?></span>
35
 
              <? else: ?>
 
35
              <?php else: ?>
36
36
                <strong><?=$topics[$i]['title'];?></strong>
37
 
              <? endif; ?>
 
37
              <?php endif; ?>
38
38
            </a><br />
39
39
            <span class="text_minus"><?=$topics[$i]['pages'];?></span>
40
40
          </td>
44
44
          <td class="center <?=$cl;?>" style="font-weight: bold;"><?=$topics[$i]['answers'];?></td>
45
45
          <td class="center <?=$cl;?>"><span class="text_minus"><?=$topics[$i]['latest'][1];?><br /><?=$topics[$i]['latest'][2];?></span></td>
46
46
        </tr>
47
 
      <? endfor; ?>
48
 
    <? else: ?>
 
47
      <?php endfor; ?>
 
48
    <?php else: ?>
49
49
      <tr>
50
50
        <td>
51
51
          <em><?=i18n('No subjects found.');?></em>
52
52
        </td>
53
53
      </tr>
54
 
    <? endif; ?>
 
54
    <?php endif; ?>
55
55
  </tbody>
56
56
</table>
57
57

                                        

 

Old New Code
16
16
    </tr>
17
17
  </thead>
18
18
  <tbody>
19
 
    <? for($i=0; $i<sizeof($categories); $i++): ?>
20
 
    <? (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
 
19
    <?php for($i=0; $i<sizeof($categories); $i++): ?>
 
20
    <?php (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
21
21
      <tr>
22
22
        <td class="<?=$cl;?>"><h3><a href="project/<?=$_dbname;?>/forum/category/<?=$categories[$i]['key'];?>"><?=$categories[$i]['value'];?></a></h3></td>
23
23
        <td class="center <?=$cl;?>" style="font-weight: bold;"><?=$categories[$i]['topics'];?></td>
24
24
        <td class="center <?=$cl;?>" style="font-weight: bold;"><?=$categories[$i]['messages'];?></td>
25
25
      </tr>
26
 
    <? endfor; ?>
 
26
    <?php endfor; ?>
27
27
  </tbody>
28
28
</table>
29
29

                                        

 

Old New Code
1
1
<h1><?=i18n('Forum');?></h1>
2
2

                                        
3
3
<div style="float: left;">
4
 
  <? if ($is_logged): ?>
 
4
  <?php if ($is_logged): ?>
5
5
    <form action="<?=getURLbyTags($this->page);?>" method="post">
6
6
      <p>
7
7
        <input type="hidden" name="postid" value="<?=$_post_id;?>" />
10
10
        <input type="submit" name="toggleclose" value="<?=i18n('Open/Close this topic');?>" />
11
11
      </p>
12
12
    </form>
13
 
  <? endif; ?>
 
13
  <?php endif; ?>
14
14
</div>
15
15

                                        
16
16
<ul class="actiontools" style="width: 250px;float: right;">
22
22

                                        
23
23
<h2>
24
24
  <a href="project/<?=$_dbname;?>/forum/category/<?=$_post_cat;?>"><?=$_post_cat_h;?></a> »
25
 
  <a href="project/<?=$_dbname;?>/forum/show/<?=$_post_id;?>" style="<? if (!$_post_isopen): ?>text-decoration: line-through<? endif; ?>"><?=$_post_title;?></a>
 
25
  <a href="project/<?=$_dbname;?>/forum/show/<?=$_post_id;?>" style="<?php if (!$_post_isopen): ?>text-decoration: line-through<?php endif; ?>"><?=$_post_title;?></a>
26
26
</h2>
27
27

                                        
28
 
<? if ($show_topic): ?>
 
28
<?php if ($show_topic): ?>
29
29
  <table style="width: 100%;" class="border_bottom border_left">
30
30
    <tr>
31
31
      <td style="width: 20%;vertical-align: top;" class="background_minor border_right">
33
33
        <br /><br />
34
34
        <em><?=$stopic_date;?></em>
35
35

                                        
36
 
        <? if ($can_edit): ?>
 
36
        <?php if ($can_edit): ?>
37
37
          <br />
38
38
          <ul style="margin-top: 10px;">
39
39
            <li><a href="project/<?=$_dbname;?>/forum/add/<?=$_post_id;?>"><?=i18n('Edit');?></a></li>
40
40
          </ul>
41
 
        <? endif; ?>
 
41
        <?php endif; ?>
42
42
      </td>
43
43
      <td style="padding: 5px;vertical-align: top;">
44
44
        <div style="display: table;table-layout: fixed;width: 100%;">
49
49
      </td>
50
50
    </tr>
51
51
  </table>
52
 
<? endif; ?>
 
52
<?php endif; ?>
53
53

                                        
54
 
<? foreach ($answers as $answer): ?>
 
54
<?php foreach ($answers as $answer): ?>
55
55
  <table style="margin-top: 20px;width: 100%;" class="border_bottom border_left">
56
56
    <tr>
57
57
      <td style="width: 20%;vertical-align: top;" class="background_minor border_right" id="answer<?=$answer['id'];?>">
62
62
        <br /><br />
63
63
        <em><?=$answer['date'];?></em>
64
64

                                        
65
 
        <? if ($answer['can_edit']): ?>
 
65
        <?php if ($answer['can_edit']): ?>
66
66
          <br />
67
67
          <ul style="margin-top: 10px;">
68
68
            <li><a href="project/<?=$_dbname;?>/forum/answer/<?=$_post_id;?>/<?=$answer['id'];?>"><?=i18n('Edit');?></a></li>
69
69
          </ul>
70
 
        <? endif; ?>
 
70
        <?php endif; ?>
71
71

                                        
72
 
        <? if ($is_logged): ?>
 
72
        <?php if ($is_logged): ?>
73
73
          <form action="<?=getURLbyTags($this->page);?>" method="post">
74
74
            <p>
75
75
              <input type="hidden" name="parentpostid" value="<?=$_post_id;?>" />
78
78
              <input type="submit" name="deleteanswer" value="<?=i18n('Delete');?>" onclick="javascript: return confirm('<?=i18n('Do you really want to delete this answer?');?>');" />
79
79
            </p>
80
80
          </form>
81
 
        <? endif; ?>
 
81
        <?php endif; ?>
82
82
      </td>
83
83
      <td style="padding: 5px;vertical-align: top;">
84
84
        <div style="display: table;table-layout: fixed;width: 100%;">
89
89
      </td>
90
90
    </tr>            
91
91
  </table>
92
 
<? endforeach; ?>
 
92
<?php endforeach; ?>
93
93

                                        
94
94
<table style="width: 100%;margin-top: 20px;">
95
95
  <tfoot>
96
96

                                        

 

Old New Code
39
39
    </tr>
40
40
  </tfoot>
41
41
  <tbody>
42
 
  <? $i=0; ?>
43
 
  <? foreach ($langs as $lang): ?>
44
 
    <? (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
 
42
  <?php $i=0; ?>
 
43
  <?php foreach ($langs as $lang): ?>
 
44
    <?php (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
45
45
    <tr class="<?=$cl;?>">
46
46
      <td>
47
47
        <a href="project/<?=$_dbname;?>/i18n/lang/<?=$lang[0];?>" style="display: block;">
64
64
      </td>
65
65
      <td class="center"><strong><?=$lang[6];?></strong></td>
66
66
    </tr>
67
 
    <? $i++; ?>
68
 
  <? endforeach; ?>
 
67
    <?php $i++; ?>
 
68
  <?php endforeach; ?>
69
69
  </tbody>
70
70
</table>
71
71

                                        

 

Old New Code
24
24
<form action="" method="post" />
25
25
<input type="hidden" name="quicksubmit" value="yes" />
26
26

                                        
27
 
<? foreach ($strings as $string): ?>
 
27
<?php foreach ($strings as $string): ?>
28
28
  <div class="translate" id="msgid-<?=$string['id'];?>">
29
29
    <a href="project/<?=$_prjname;?>/i18n/translate/<?=$_lang;?>/<?=$string['id'];?>">
30
30
      <span class="head"><?=i18n('String #%(id)d', array('id' => $string['id']));?></span></a>
33
33

                                        
34
34
    <hr />
35
35

                                        
36
 
    <? if ($string['cur'] > 0): ?>
37
 
      <? if ($is_logged): ?>
 
36
    <?php if ($string['cur'] > 0): ?>
 
37
      <?php if ($is_logged): ?>
38
38
        <label><input type="radio" name="whattodo-<?=$string['id'];?>" value="nothing" checked="checked" />&nbsp;<span class="head"><?=i18n('Current translation:');?></span></label>
39
 
      <? else: ?>
 
39
      <?php else: ?>
40
40
        <span class="head"><?=i18n('Current translation:');?></span>      
41
 
      <? endif; ?>
 
41
      <?php endif; ?>
42
42

                                        
43
43
      <div class="proposal">
44
44
        <strong><?=$string['cur']['type'];?></strong>
46
46

                                        
47
47
        <span class="string prop"><?=$string['cur']['string'];?></span>
48
48
      </div>
49
 
    <? else: ?>
 
49
    <?php else: ?>
50
50
      <span class="head"><?=i18n('Not translated yet.');?></span>
51
51
      <a href="project/<?=$_prjname;?>/i18n/translate/<?=$_lang;?>/<?=$string['id'];?>">
52
52
        <?=i18n('Translate it.');?></a>
53
 
    <? endif; ?>
 
53
    <?php endif; ?>
54
54

                                        
55
 
    <? if ($is_logged): ?>
 
55
    <?php if ($is_logged): ?>
56
56
      <p>