# topic/1.0.11/templates/briefs.php

Topic SEO Content Optimization Tool, version 1.0.11. 78 lines.

- Page: https://pluginprobe.com/plugins/topic/1.0.11/code/templates/briefs.php
- Raw: https://pluginprobe.com/plugins/topic/1.0.11/raw/templates/briefs.php
- Modified: 2022-02-10T22:12:22+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/topic/1.0.11/code/templates/briefs.php#L10-L20`.

```php
<?php 
if( ! defined( 'ABSPATH') ) {
    exit;
}
/**
 * Briefs View
 */

if($allBriefs){}else{ $allBriefs = $UseTopicApi->getBriefsbyTopicToken($preloginToken); }
$allBriefs 	= json_decode($allBriefs);
$utUserMail =  get_option('usetopicapi_email');

?>
<div class="usetopicbriefs hidebig">
	<div class="sign-in"><p><?php echo __( 'Signed in as', 'usetopic-plugin' ); ?> <?php echo $utUserMail;  ?></p>
		<div class="usetopic_logout">
			<button class="usetopic_logout_btn">
				<svg class="MuiSvgIcon-root MuiSvgIcon-colorPrimary" focusable="false" viewBox="0 0 24 24" aria-hidden="true" style="color: rgb(133, 159, 189);"><path d="M10.09 15.59L11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67l-2.58 2.59zM19 3H5c-1.11 0-2 .9-2 2v4h2V5h14v14H5v-4H3v4c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"></path></svg>
				<p class="usetopic-tooltip">Logout</p>
			</button>

		</div>
	</div>
	<h3>Search Briefs</h3>
	<div class="search-usetopic">
		<svg class="MuiSvgIcon-root MuiSvgIcon-colorPrimary" focusable="false" viewBox="0 0 24 24" aria-hidden="true" style="position: relative; top: 3px; opacity: 0.6;"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path></svg>
	<input type="text" name="search-usetopic" id="search-usetopic" value="" placeholder="Search briefs by keywords" />
</div>
	<h3 class="usetopic_ycb"><?php echo __( 'Your Content Briefs', 'usetopic-plugin' ); ?></h3>
	<table class="kyword-create"> 
		<thead><tr><th><?php echo __( 'Keyword', 'usetopic-plugin' ); ?> </th><th class="create"><?php echo __( 'Created', 'usetopic-plugin' ); ?></th></tr></thead>
		<tbody id="kyword-create-body">
		<?php if(!empty($allBriefs->reports)){ 
			$reports = $allBriefs->reports; 
			foreach($reports as $singleTopic){
				/* $now = time(); // or your date as well
				$your_date = strtotime($singleTopic->created_at);
				$datediff = $now - $your_date;

				$daysAgo = round($datediff / (60 * 60 * 24)); */

				$topicCdate	= date_create(date('Y-m-d H:i:s', strtotime($singleTopic->created_at)));
				$todayDate  = date_create(date('Y-m-d H:i:s', time()));
				$difference = date_diff($topicCdate,$todayDate);
				if(!empty($difference)){
				$diffDate = '';
				if(!empty( $difference->y ) ){
					if($difference->y == 1){ $diffDate = $difference->y. ' year ago'; }else{ $diffDate = $difference->y. ' years ago'; }
				}elseif($difference->m){
					if($difference->m == 1){ $diffDate = $difference->m. ' month ago'; }else{ $diffDate = $difference->m. ' months ago'; }
					
				}elseif($difference->d){
					if($difference->d == 1){ $diffDate = $difference->d. ' day ago'; }else{ $diffDate = $difference->d. ' days ago'; }
					
				}elseif($difference->h){
					if($difference->h == 1){ $diffDate = $difference->h. ' hour ago'; }else{ $diffDate = $difference->h. ' hours ago'; }
					
				}elseif($difference->i){
					if($difference->i == 1){ $diffDate = $difference->i. ' minute ago'; }else{ $diffDate = $difference->i. ' minutes ago'; }
					
				}elseif($difference->s){
					if($difference->s == 1){ $diffDate = $difference->s. ' seconds ago'; }else{ $diffDate = $difference->s. ' seconds ago'; }
					
				}else{
					$diffDate = '0 seconds ago';
				}
			}else{
				$diffDate = '0 seconds ago';
			}

		?>
		<tr class="usetopic-brief-tr" data-id="<?php echo $singleTopic->id; ?>" > <td><?php echo $singleTopic->name;  ?></td><td><?php echo $diffDate; //if($daysAgo == 0){ echo "Today"; }elseif($daysAgo == 1){ echo $daysAgo.' day ago'; }else{ echo $daysAgo.' days ago'; }  ?></td></tr>
	<?php } } ?>
		</tbody>
	</table>
	<div class="use-topic-top-bar bottom-briefs-bar"><p><a href="https://www.usetopic.com/" target="_blank"><svg width="20" height="20" role="img" aria-hidden="true" focusable="false"><g transform="translate(3.000000,21.000000) scale(0.013,-0.013)"><path d="M904 1621 c-138 -54 -368 -232 -491 -380 -61 -72 -69 -107 -59 -245 l6 -90 -24 33 c-13 18 -30 46 -36 62 -18 43 -28 36 -36 -28 -7 -57 9 -190 24 -205 4 -4 53 59 109 140 93 134 223 303 302 392 17 19 -24 -39 -92 -130 -224 -300 -398 -580 -543 -874 -61 -122 -64 -132 -64 -200 0 -79 11 -111 28 -80 5 11 49 109 97 219 48 110 123 266 168 348 66 121 84 147 103 147 40 0 150 39 190 68 49 36 81 80 62 86 -7 3 -48 8 -92 11 -43 4 -74 11 -70 15 5 5 65 26 134 47 l125 39 63 94 c133 201 212 392 212 512 0 43 -2 48 -22 48 -13 -1 -55 -13 -94 -29z"></path></g></svg><?php echo __( 'Topic', 'usetopic-plugin' ); ?></a><a target="_blank" href="https://wordpress.org/plugins/topic/#developers" style="font-size: 0.6rem;text-decoration: underline;">v1.0.11</a></p><span><a href="https://usetopic.zendesk.com/hc/en-us" target="_blank"><?php echo __( 'HELP', 'usetopic-plugin' ); ?></a></span></div>
</div>
<div class="smallScreenContent">The Topic plugin only supports browser dimensions of 950px or wider. Please make the browser window wider to continue using plugin.</div>
```
