-
Notifications
You must be signed in to change notification settings - Fork 0
/
single-plagiarism_case.php
121 lines (99 loc) · 3.33 KB
/
single-plagiarism_case.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<?php get_header(); ?>
<div id="wrapper">
<div class="container">
<div class="row">
<div class="col-sm-9">
<?php
$user_table = piklist(get_users(
array(
'orderby' => 'display_name'
,'order' => 'asc'
)
,'objects'
)
,array('ID' ,'display_name')
);
?>
<?php while (have_posts()) : the_post(); ?>
<?php if ($post->post_content == '') : ?>
<?php else : ?>
<div id="wrapper">
<div class="container">
<div class="row">
<div class="col-sm-9">
<header>
<h3>Plagiarism case <?php echo get_the_ID() ?></h3>
</header>
<table class="plagiarism-single-case stripe"><thead><tr><td></td><td></td></tr></thead><tbody>
<tr>
<td class='first-row-single-case'>Copied link</td>
<td><?php
$cl = get_the_title( get_the_ID() );
printf('<a href="http://%s" target="_blank">%s</a>', $cl, $cl);
?></td>
</tr>
<tr>
<td class='first-row-single-case'>Original link</td>
<td><?php
// check for link or other (if http:// or www. is present)
function is_url($str){
if( stripos( $str, 'www.') !== FALSE ) return TRUE;
elseif ( stripos( $str, 'http://') !== FALSE ) return TRUE;
else return FALSE;
}
$ol = get_post_meta(get_the_ID(), 'original', true);
if ( is_url( $ol ) ) printf('<a href="http://%s" target="_blank">%s</a>', $ol, $ol);
else echo $ol;
?></td>
</tr>
<tr>
<td class='first-row-single-case'>Date posted</td>
<td><?php echo get_the_date(); ?> @ <?php the_time(); ?></td>
</tr>
<tr>
<td class='first-row-single-case'>Status</td>
<td><?php echo get_post_status( $post->ID ); ?></td>
</tr>
<tr>
<td class='first-row-single-case'>Assigned User</td>
<td><?php echo $user_table[get_post_meta(get_the_ID(), 'assigned_user', true)]; ?></td>
</tr>
<tr>
<td class='first-row-single-case'>Category</td>
<td><ul>
<?php
$cats = get_the_terms( $post->ID, 'case_category');
if ($cats == false) echo '<li>none</li>';
foreach($cats as $cat) {
echo '<li>' . $cat->name . '</li>';
}
?>
</ul></td>
</tr>
<tr>
<td class='first-row-single-case'>Submitter</td>
<td><?php the_author(); ?></td>
</tr>
<tr>
<td class='first-row-single-case'>Description</td>
<td><?php the_content(); ?></td>
</tr>
</tbody></table>
<?php comments_template( ); ?>
</div><!-- /col-sm-12 -->
</div><!-- /row -->
</div> <!-- /container -->
</div><!-- /ww -->
<?php endif; ?>
<?php wp_reset_postdata(); ?>
<?php endwhile; ?>
</div>
<?php if ( is_active_sidebar('right-sidebar') ) { ?>
<div class="col-sm-3">
<?php dynamic_sidebar('right-sidebar'); ?>
</div>
<?php } ?>
</div><!-- /row -->
</div> <!-- /container -->
</div><!-- /ww -->
<?php get_footer(); ?>