Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- global $global_page_layout;
- $single_page_layout = get_post_meta(get_the_ID(),'sidebar_layout',true);
- $content_padding = get_post_meta(get_the_ID(),'content_padding',true);
- $layout = $single_page_layout ? $single_page_layout : ($global_page_layout ? $global_page_layout : ot_get_option('post_layout','right'));
- $global_page_layout = $layout;
- get_header();
- ?>
- <script src="<?php echo get_template_directory_uri(); ?>/js/tableToExcel.js"></script>
- <?php get_template_part( 'header', 'heading' ); ?>
- <div id="body">
- <div class="container">
- <?php if($content_padding!='off'){ ?>
- <div class="content-pad-3x">
- <?php }?>
- <div class="row">
- <div id="content" class="<?php echo $layout!='full'?'col-md-9':'col-md-12' ?><?php echo ($layout == 'left') ? " revert-layout":"";?>" role="main">
- <article class="single-post-content single-content">
- <?php if (is_user_logged_in()){ ?>
- <style>
- .table-grid {
- width: 100%;
- margin-bottom: 1em;
- border-collapse: collapse;
- border-spacing: 0;
- }
- .table-grid th, table td {
- border: 1px solid #ccc;
- padding: 0.5em;
- }
- /**
- * Force table cells to all render at the same width.
- */
- .table-grid {
- table-layout: fixed;
- }
- </style>
- <?php
- if (isset($_GET['needs'])) { ?>
- <?php
- // Find connected pages
- $connected = new WP_Query( array(
- 'connected_type' => 'invitation_to_graphicdesign',
- 'connected_items' => $post,
- 'nopaging' => true
- ) );
- // Display connected pages
- if ( $connected->have_posts() ) :
- ?>
- <table id="invitationlistexport" class="table-grid demo">
- <thead style="display: table-header-group">
- <tr style="background-color:#17376e;color:#FFFFFF;text-align:center;">
- <td colspan="5">
- <h3 style="color:#FFFFFF;text-align: center;">Graphic Design</h3></tr>
- </td>
- <tr style="background-color:#46a5e5;color:#FFFFFF;text-align:center;">
- <th width="20%" align="center"><h3 style="color:#FFFFFF;text-align: center;">التصاميم</h3></th>
- <th width="20%" align="center">الكمية</th>
- <th width="20%" align="center">تفاصيل</th>
- <th width="20%" align="center">تنفيذ</th>
- <th width="20%" align="center">تكاليف</th>
- </tr>
- <?php while ( $connected->have_posts() ) : $connected->the_post(); ?>
- <tr style="text-align:center;color:#343434;">
- <th align="center"><h4 style="text-align: center;color:#343434;"><?php the_title(); ?></h4>
- </th>
- <th align="center">
- <h4 style="text-align: center;color:#343434;"><?php if (p2p_get_meta(get_post()->p2p_id, 'Number', true)) { ?>
- <?php echo p2p_get_meta( get_post()->p2p_id, 'Number', true ); ?>
- <?php } else { ?>
- -
- <?php } ?></h4>
- </th>
- <th align="center">
- <h4 style="text-align: center;color:#343434;"><?php if (p2p_get_meta(get_post()->p2p_id, 'graphicsdescription', true)) { ?>
- <?php echo p2p_get_meta( get_post()->p2p_id, 'graphicsdescription', true ); ?>
- <?php } else { ?>
- -
- <?php } ?></h4>
- </th>
- <th align="center">
- <h4 style="text-align: center;color:#343434;"><?php if (p2p_get_meta(get_post()->p2p_id, 'graphicdoneby', true)) { ?>
- <?php echo p2p_get_meta( get_post()->p2p_id, 'graphicdoneby', true ); ?>
- <?php } else { ?>
- -
- <?php } ?></h4>
- </th>
- <th align="center">
- <h4 style="text-align: center;color:#343434;"><?php if (p2p_get_meta(get_post()->p2p_id, 'printcost', true)) { ?>
- <?php echo p2p_get_meta( get_post()->p2p_id, 'printcost', true ); ?>
- <?php } else { ?>
- -
- <?php } ?></h4>
- </th>
- </tr>
- <?php endwhile;
- wp_reset_postdata(); // set $post back to original post
- ?>
- </thead>
- </table>
- <?php endif; ?>
- <?php
- // Find connected pages
- $connected = new WP_Query( array(
- 'connected_type' => 'invitation_to_communications',
- 'connected_items' => $post,
- 'nopaging' => true
- ) );
- // Display connected pages
- if ( $connected->have_posts() ) :
- ?>
- <table id="invitationlistexport" class="table-grid demo">
- <thead style="display: table-header-group">
- <tr style="background-color:#17376e;color:#FFFFFF;text-align:center;">
- <td colspan="4">
- <h3 style="color:#FFFFFF;text-align: center;">Communications</h3></tr>
- </td>
- <tr style="background-color:#46a5e5;color:#FFFFFF;text-align:center;">
- <th width="20%" align="center"><h3 style="color:#FFFFFF;text-align: center;">النشر</h3></th>
- <th width="20%" align="center">تنفيذ</th>
- <th width="20%" align="center">نشر في</th>
- <th width="20%" align="center">تكاليف</th>
- </tr>
- <?php while ( $connected->have_posts() ) : $connected->the_post(); ?>
- <tr style="text-align:center;color:#343434;">
- <th align="center"><h4 style="text-align: center;color:#343434;"><?php the_title(); ?></h4>
- <!--<?php echo $post->p2p_id; ?>-->
- </th>
- <th align="center">
- <h4 style="text-align: center;color:#343434;"><?php if (p2p_get_meta(get_post()->p2p_id, 'Doneby', true)) { ?>
- <?php echo p2p_get_meta( get_post()->p2p_id, 'Doneby', true ); ?>
- <?php } else { ?>
- -
- <?php } ?></h4>
- </th>
- <th align="center">
- <h4 style="text-align: center;color:#343434;"><?php if (p2p_get_meta(get_post()->p2p_id, 'sentto', true)) { ?>
- <?php echo p2p_get_meta( get_post()->p2p_id, 'sentto', true ); ?>
- <?php } else { ?>
- -
- <?php } ?></h4>
- </th>
- <th align="center">
- <h4 style="text-align: center;color:#343434;"><?php if (p2p_get_meta(get_post()->p2p_id, 'Cost', true)) { ?>
- <?php echo p2p_get_meta( get_post()->p2p_id, 'Cost', true ); ?>
- <?php } else { ?>
- -
- <?php } ?></h4>
- </th>
- </tr>
- <?php endwhile;
- wp_reset_postdata(); // set $post back to original post
- ?>
- </thead>
- </table>
- <?php endif; ?>
- <?php
- // Find connected pages
- $connected = new WP_Query( array(
- 'connected_type' => 'invitation_to_productionunit',
- 'connected_items' => $post,
- 'nopaging' => true
- ) );
- // Display connected pages
- if ( $connected->have_posts() ) :
- ?>
- <table id="invitationlistexport" class="table-grid demo">
- <thead style="display: table-header-group">
- <tr style="background-color:#17376e;color:#FFFFFF;text-align:center;">
- <td colspan="4">
- <h3 style="color:#FFFFFF;text-align: center;">Production</h3></tr>
- </td>
- <tr style="background-color:#46a5e5;color:#FFFFFF;text-align:center;">
- <th width="20%" align="center"><h3 style="color:#FFFFFF;text-align: center;">الخدمة</h3></th>
- <th width="20%" align="center">تنفيذ</th>
- <th width="20%" align="center">تفاصيل</th>
- <th width="20%" align="center">تكاليف</th>
- </tr>
- <?php while ( $connected->have_posts() ) : $connected->the_post(); ?>
- <tr style="text-align:center;color:#343434;">
- <th align="center"><h4 style="text-align: center;color:#343434;"><?php the_title(); ?></h4>
- <!--<?php echo $post->p2p_id; ?>-->
- </th>
- <th align="center">
- <h4 style="text-align: center;color:#343434;"><?php if (p2p_get_meta(get_post()->p2p_id, 'Doneby', true)) { ?>
- <?php echo p2p_get_meta( get_post()->p2p_id, 'Doneby', true ); ?>
- <?php } else { ?>
- -
- <?php } ?></h4>
- </th>
- <th align="center">
- <h4 style="text-align: center;color:#343434;"><?php if (p2p_get_meta(get_post()->p2p_id, 'Note', true)) { ?>
- <?php echo p2p_get_meta( get_post()->p2p_id, 'Note', true ); ?>
- <?php } else { ?>
- -
- <?php } ?></h4>
- </th>
- <th align="center">
- <h4 style="text-align: center;color:#343434;"><?php if (p2p_get_meta(get_post()->p2p_id, 'Cost', true)) { ?>
- <?php echo p2p_get_meta( get_post()->p2p_id, 'Cost', true ); ?>
- <?php } else { ?>
- -
- <?php } ?></h4>
- </th>
- </tr>
- <?php endwhile;
- wp_reset_postdata(); // set $post back to original post
- ?>
- </thead>
- </table>
- <?php endif; ?>
- <?php
- // Find connected pages
- $connected = new WP_Query( array(
- 'connected_type' => 'invitation_to_itemsneeded',
- 'connected_items' => $post,
- 'nopaging' => true
- ) );
- if ( $connected->have_posts() ) :
- // Display connected pages
- ?>
- <table id="invitationlistexport" class="table-grid demo">
- <thead style="display: table-header-group">
- <tr style="background-color:#17376e;color:#FFFFFF;text-align:center;">
- <td colspan="4">
- <h3 style="color:#FFFFFF;text-align: center;">Items Needed</h3></tr>
- </td>
- <tr style="background-color:#46a5e5;color:#FFFFFF;text-align:center;">
- <th width="20%" align="center"><h3 style="color:#FFFFFF;text-align: center;">المستلزمات</h3></th>
- <th width="20%" align="center">الكمية</th>
- <th width="20%" align="center">ملاحظات</th>
- <th width="20%" align="center">تكاليف</th>
- </tr>
- <?php while ( $connected->have_posts() ) : $connected->the_post(); ?>
- <tr style="text-align:center;color:#343434;">
- <th align="center"><h4 style="text-align: center;color:#343434;"><?php the_title(); ?></h4>
- <!--<?php echo $post->p2p_id; ?>-->
- </th>
- <th align="center">
- <h4 style="text-align: center;color:#343434;"><?php if (p2p_get_meta(get_post()->p2p_id, 'number', true)) { ?>
- <?php echo p2p_get_meta( get_post()->p2p_id, 'number', true ); ?>
- <?php } else { ?>
- -
- <?php } ?></h4>
- </th>
- <th align="center">
- <h4 style="text-align: center;color:#343434;"><?php if (p2p_get_meta(get_post()->p2p_id, 'Note', true)) { ?>
- <?php echo p2p_get_meta( get_post()->p2p_id, 'Note', true ); ?>
- <?php } else { ?>
- -
- <?php } ?></h4>
- </th>
- <th align="center">
- <h4 style="text-align: center;color:#343434;"><?php if (p2p_get_meta(get_post()->p2p_id, 'Cost', true)) { ?>
- <?php echo p2p_get_meta( get_post()->p2p_id, 'Cost', true ); ?>
- <?php } else { ?>
- -
- <?php } ?></h4>
- </th>
- </tr>
- <?php endwhile;
- wp_reset_postdata(); // set $post back to original post
- ?>
- </thead>
- </table>
- <?php endif; ?>
- <?php
- // Find connected pages
- $connected = new WP_Query( array(
- 'connected_type' => 'invitation_to_hallandstage',
- 'connected_items' => $post,
- 'nopaging' => true
- ) );
- if ( $connected->have_posts() ) :
- // Display connected pages
- ?>
- <table id="invitationlistexport" class="table-grid demo">
- <thead style="display: table-header-group">
- <tr style="background-color:#17376e;color:#FFFFFF;text-align:center;">
- <td colspan="3">
- <h3 style="color:#FFFFFF;text-align: center;">القاعة</h3></tr>
- </td>
- <tr style="background-color:#46a5e5;color:#FFFFFF;text-align:center;">
- <th width="20%" align="center"><h3 style="color:#FFFFFF;text-align: center;">القاعة</h3></th>
- <th width="20%" align="center">ملاحظات</th>
- <th width="20%" align="center">تكاليف</th>
- </tr>
- <?php while ( $connected->have_posts() ) : $connected->the_post(); ?>
- <tr style="text-align:center;color:#343434;">
- <th align="center"><h4 style="text-align: center;color:#343434;"><?php the_title(); ?></h4>
- <!--<?php echo $post->p2p_id; ?>-->
- </th>
- <th align="center">
- <h4 style="text-align: center;color:#343434;"><?php if (p2p_get_meta(get_post()->p2p_id, 'Note', true)) { ?>
- <?php echo p2p_get_meta( get_post()->p2p_id, 'Note', true ); ?>
- <?php } else { ?>
- -
- <?php } ?></h4>
- </th>
- <th align="center">
- <h4 style="text-align: center;color:#343434;"><?php if (p2p_get_meta(get_post()->p2p_id, 'Cost', true)) { ?>
- <?php echo p2p_get_meta( get_post()->p2p_id, 'Cost', true ); ?>
- <?php } else { ?>
- -
- <?php } ?></h4>
- </th>
- </tr>
- <?php endwhile;
- wp_reset_postdata(); // set $post back to original post
- ?>
- </thead>
- </table>
- <?php endif; ?>
- <?php
- // Find connected pages
- $connected = new WP_Query( array(
- 'connected_type' => 'invitation_to_foodandcatering',
- 'connected_items' => $post,
- 'nopaging' => true
- ) );
- if ( $connected->have_posts() ) :
- // Display connected pages
- ?>
- <table id="invitationlistexport" class="table-grid demo">
- <thead style="display: table-header-group">
- <tr style="background-color:#17376e;color:#FFFFFF;text-align:center;">
- <td colspan="5">
- <h3 style="color:#FFFFFF;text-align: center;">Food and Catering</h3></tr>
- </td>
- <tr style="background-color:#46a5e5;color:#FFFFFF;text-align:center;">
- <th width="20%" align="center"><h3 style="color:#FFFFFF;text-align: center;">الطلبات</h3></th>
- <th width="20%" align="center">العدد</th>
- <th width="20%" align="center">عدد الأشخاص</th>
- <th width="20%" align="center">ملاحظات</th>
- <th width="20%" align="center">تكاليف</th>
- </tr>
- <?php while ( $connected->have_posts() ) : $connected->the_post(); ?>
- <tr style="text-align:center;color:#343434;">
- <th align="center"><h4 style="text-align: center;color:#343434;"><?php the_title(); ?></h4>
- <!--<?php echo $post->p2p_id; ?>-->
- </th>
- <th align="center">
- <h4 style="text-align: center;color:#343434;"><?php if (p2p_get_meta(get_post()->p2p_id, 'Number', true)) { ?>
- <?php echo p2p_get_meta( get_post()->p2p_id, 'Number', true ); ?>
- <?php } else { ?>
- -
- <?php } ?></h4>
- </th>
- <th align="center">
- <h4 style="text-align: center;color:#343434;"><?php if (p2p_get_meta(get_post()->p2p_id, 'Nbpersons', true)) { ?>
- <?php echo p2p_get_meta( get_post()->p2p_id, 'Nbpersons', true ); ?>
- <?php } else { ?>
- -
- <?php } ?></h4>
- </th>
- <th align="center">
- <h4 style="text-align: center;color:#343434;"><?php if (p2p_get_meta(get_post()->p2p_id, 'Description', true)) { ?>
- <?php echo p2p_get_meta( get_post()->p2p_id, 'Description', true ); ?>
- <?php } else { ?>
- -
- <?php } ?></h4>
- </th>
- <th align="center">
- <h4 style="text-align: center;color:#343434;"><?php if (p2p_get_meta(get_post()->p2p_id, 'Cost', true)) { ?>
- <?php echo p2p_get_meta( get_post()->p2p_id, 'Cost', true ); ?>
- <?php } else { ?>
- -
- <?php } ?></h4>
- </th>
- </tr>
- <?php endwhile;
- wp_reset_postdata(); // set $post back to original post
- ?>
- </thead>
- </table>
- <?php endif; ?>
- <?php
- // Find connected pages
- $connected = new WP_Query( array(
- 'connected_type' => 'invitation_to_eventbenefits',
- 'connected_items' => $post,
- 'nopaging' => true
- ) );
- if ( $connected->have_posts() ) :
- // Display connected pages
- ?>
- <table id="invitationlistexport" class="table-grid demo">
- <thead style="display: table-header-group">
- <tr style="background-color:#17376e;color:#FFFFFF;text-align:center;">
- <td colspan="3">
- <h3 style="color:#FFFFFF;text-align: center;">Event Benefits</h3></tr>
- </td>
- <tr style="background-color:#46a5e5;color:#FFFFFF;text-align:center;">
- <th width="20%" align="center"><h3 style="color:#FFFFFF;text-align: center;">الطلبات</h3></th>
- <th width="20%" align="center">العدد</th>
- <th width="20%" align="center">ملاحظات</th>
- </tr>
- <?php while ( $connected->have_posts() ) : $connected->the_post(); ?>
- <tr style="text-align:center;color:#343434;">
- <th align="center"><h4 style="text-align: center;color:#343434;"><?php the_title(); ?></h4>
- <!--<?php echo $post->p2p_id; ?>-->
- </th>
- <th align="center">
- <h4 style="text-align: center;color:#343434;"><?php if (p2p_get_meta(get_post()->p2p_id, 'Number', true)) { ?>
- <?php echo p2p_get_meta( get_post()->p2p_id, 'Number', true ); ?>
- <?php } else { ?>
- -
- <?php } ?></h4>
- </th>
- <th align="center">
- <h4 style="text-align: center;color:#343434;"><?php if (p2p_get_meta(get_post()->p2p_id, 'Description', true)) { ?>
- <?php echo p2p_get_meta( get_post()->p2p_id, 'Description', true ); ?>
- <?php } else { ?>
- -
- <?php } ?></h4>
- </th>
- </tr>
- <?php endwhile;
- wp_reset_postdata(); // set $post back to original post
- ?>
- </thead>
- </table>
- <?php endif; ?>
- <?php
- // Find connected pages
- $connected = new WP_Query( array(
- 'connected_type' => 'invitation_to_transportation',
- 'connected_items' => $post,
- 'nopaging' => true
- ) );
- if ( $connected->have_posts() ) :
- // Display connected pages
- ?>
- <table id="invitationlistexport" class="table-grid demo">
- <thead style="display: table-header-group">
- <tr style="background-color:#17376e;color:#FFFFFF;text-align:center;">
- <td colspan="3">
- <h3 style="color:#FFFFFF;text-align: center;">Transportation</h3></tr>
- </td>
- <tr style="background-color:#46a5e5;color:#FFFFFF;text-align:center;">
- <th width="20%" align="center"><h3 style="color:#FFFFFF;text-align: center;"></h3></th>
- <th width="20%" align="center">ملاحظات</th>
- <th width="20%" align="center">تكاليف</th>
- </tr>
- <?php while ( $connected->have_posts() ) : $connected->the_post(); ?>
- <tr style="text-align:center;color:#343434;">
- <th align="center"><h4 style="text-align: center;color:#343434;"><?php the_title(); ?></h4>
- <!--<?php echo $post->p2p_id; ?>-->
- </th>
- <th align="center">
- <h4 style="text-align: center;color:#343434;"><?php if (p2p_get_meta(get_post()->p2p_id, 'Note', true)) { ?>
- <?php echo p2p_get_meta( get_post()->p2p_id, 'Note', true ); ?>
- <?php } else { ?>
- -
- <?php } ?></h4>
- </th>
- <th align="center">
- <h4 style="text-align: center;color:#343434;"><?php if (p2p_get_meta(get_post()->p2p_id, 'Cost', true)) { ?>
- <?php echo p2p_get_meta( get_post()->p2p_id, 'Cost', true ); ?>
- <?php } else { ?>
- -
- <?php } ?></h4>
- </th>
- </tr>
- <?php endwhile;
- wp_reset_postdata(); // set $post back to original post
- ?>
- </thead>
- </table>
- <?php endif; ?>
- <?php
- // Find connected pages
- $connected = new WP_Query( array(
- 'connected_type' => 'invitation_to_hotelsaccommodations',
- 'connected_items' => $post,
- 'nopaging' => true
- ) );
- if ( $connected->have_posts() ) :
- // Display connected pages
- ?>
- <table id="invitationlistexport" class="table-grid demo">
- <thead style="display: table-header-group">
- <tr style="background-color:#17376e;color:#FFFFFF;text-align:center;">
- <td colspan="3">
- <h3 style="color:#FFFFFF;text-align: center;">Hotels</h3></tr>
- </td>
- <tr style="background-color:#46a5e5;color:#FFFFFF;text-align:center;">
- <th width="20%" align="center"><h3 style="color:#FFFFFF;text-align: center;"></h3></th>
- <th width="20%" align="center">ملاحظات</th>
- <th width="20%" align="center">تكاليف</th>
- </tr>
- <?php while ( $connected->have_posts() ) : $connected->the_post(); ?>
- <tr style="text-align:center;color:#343434;">
- <th align="center"><h4 style="text-align: center;color:#343434;"><?php the_title(); ?></h4>
- <!--<?php echo $post->p2p_id; ?>-->
- </th>
- <th align="center">
- <h4 style="text-align: center;color:#343434;"><?php if (p2p_get_meta(get_post()->p2p_id, 'Note', true)) { ?>
- <?php echo p2p_get_meta( get_post()->p2p_id, 'Note', true ); ?>
- <?php } else { ?>
- -
- <?php } ?></h4>
- </th>
- <th align="center">
- <h4 style="text-align: center;color:#343434;"><?php if (p2p_get_meta(get_post()->p2p_id, 'Cost', true)) { ?>
- <?php echo p2p_get_meta( get_post()->p2p_id, 'Cost', true ); ?>
- <?php } else { ?>
- -
- <?php } ?></h4>
- </th>
- </tr>
- <?php endwhile;
- wp_reset_postdata(); // set $post back to original post
- ?>
- </thead>
- </table>
- <?php endif; ?>
- <?php } else { ?>
- <!--start--show-table-->
- <table id="invitationlistexport" class="table-grid demo" >
- <thead style="display: table-header-group">
- <tr style="background-color:#17376e;color:#FFFFFF;text-align:center;">
- <th width="20%" id="name" align="center"><h3 style="color:#FFFFFF;text-align: center;"><?php echo get_the_title( $ID ); ?></h3></th>
- <th width="14%" id="position" align="center"></th>
- <th width="14%" id="address" align="center"></th>
- <th width="10%" id="phone" align="center"></th>
- <th width="10%" id="mobile" align="center"></th>
- <th width="16%" id="email" align="center"></th>
- <th width="8%" id="invitations" align="center"></th>
- <th width="8%" id="invities" align="center"></th>
- </tr>
- <tr style="background-color:#46a5e5;color:#FFFFFF;text-align:center;">
- <th id="name" align="center"><h4 style="text-align: center;color:#FFFFFF;"><?php $date = get_post_meta($post->ID, 'ecpt_eventdate', true); echo date('F j, Y', $date); ?></h4></th>
- <th id="position" align="center"></th>
- <th id="address" align="center"></th>
- <th id="phone" align="center"></th>
- <th id="mobile" align="center"></th>
- <th id="email" align="center"></th>
- <th id="invitations" align="center"></th>
- <th id="invities" align="center"></th>
- </tr>
- <tr id="repeatheader">
- <th id="name" align="center"><h4> الإسم</h4></th>
- <th id="position" align="center"><h4> الوظيفة</h4></th>
- <th id="address" align="center"><h4> العنوان</h4></th>
- <th id="phone" align="center"><h4> الهاتف</h4></th>
- <th id="mobile" align="center"><h4> الموبايل</h4></th>
- <th id="email" align="center"><h4> الإيميل</h4></th>
- <th id="invitations" align="center"><h4>عدد الدعوات</h4></th>
- <th id="invities" align="center"><h4>عدد المدعويين</h4></th>
- </tr>
- </thead>
- <tbody>
- <?php
- $do_not_duplicate = array();
- //get all categories then display all posts in each term
- $taxonomy = 'category';
- $param_type = 'category__in';
- $term_args=array(
- );
- $terms = get_terms($taxonomy,$term_args);
- if ($terms) {
- $counter = 1;
- $total_invitations=0;
- $total_invitees=0;
- foreach( $terms as $term ) {
- $args=array(
- 'parent' => 0,
- "$param_type" => array($term->term_id),
- 'connected_type' => 'posts_to_invitations',
- 'connected_items' => get_queried_object(),
- 'nopaging' => true,
- 'post_type' => 'post',
- 'post_status' => 'publish,draft',
- 'posts_per_page' => -1,
- 'post__not_in' => $do_not_duplicate,
- 'caller_get_posts'=> 1
- );
- $my_query = null;
- $my_query = new WP_Query($args);
- if( $my_query->have_posts() ) {
- $cat_invitations=$my_query->found_posts;
- $cat_invitees=0;
- $do_not_duplicate[] = get_the_ID();
- ?>
- <tr id="categoryname">
- <td style=" background-color: #17376e;color:#FFFFFF"><h3><?php echo $term->name;?></h3></td>
- <td style=" background-color: #17376e;color:#FFFFFF"></td>
- <td style=" background-color: #17376e;color:#FFFFFF"></td>
- <td style=" background-color: #17376e;color:#FFFFFF"></td>
- <td style=" background-color: #17376e;color:#FFFFFF"></td>
- <td style=" background-color: #17376e;color:#FFFFFF"></td>
- <td style=" background-color: #17376e;color:#FFFFFF"></td>
- <td style=" background-color: #17376e;color:#FFFFFF"></td>
- </tr>
- <?php
- if( $my_query->have_posts() ) {
- while ($my_query->have_posts()) :
- $my_query->the_post();
- $post_id = get_the_ID();
- if (in_array($post_id, $do_not_duplicate)) {
- continue; // We've already seen this post ID, so skip the rest of the loop
- }
- if (p2p_get_meta(get_post()->p2p_id, 'couples', true) == '1') $cat_invitees+= 2;
- else $cat_invitees++;
- $do_not_duplicate[] = $post_id;
- ?>
- <tr>
- <td id="name"><h5>
- <a href="<?php the_permalink(); ?>">
- <?php if (p2p_get_meta(get_post()->p2p_id, 'couples', true) == '1') { ?>
- <!--if Couple Invitation Start -->
- <!-- If Male -->
- <?php $your_custom_field = get_post_meta($post->ID, 'ecpt_gender', true); if ( $your_custom_field == 'Male' ) { ?>
- <?php
- $string= get_the_title();
- if(strlen($string) != mb_strlen($string, 'utf-8'))
- {?>
- <?php $contactstatus = get_post_meta($post->ID, 'ecpt_maritalstatus', true); if ( $contactstatus == 'Married' ) { ?>
- <!-- If Arabic --><?php echo get_post_meta($post->ID, 'ecpt_contacttitle', true); ?> <?php the_title(); ?> وعقيلته المحترمين<!-- End If Arabic -->
- <?php } else { ?>
- <span style="color: red;font-weight: bold;">يرجى التأكد من حالة <?php the_title(); ?> الإجتماعية</span>
- <?php } ?>
- <?php } else { ?>
- <?php $contactstatus = get_post_meta($post->ID, 'ecpt_maritalstatus', true); if ( $contactstatus == 'Married' ) { ?>
- <!-- If English --><?php echo get_post_meta($post->ID, 'ecpt_contacttitle', true); ?> & Ms. <?php the_title(); ?><!--End If English -->
- <?php } else { ?>
- <span style="color: red;font-weight: bold;">يرجى التأكد من حالة <?php the_title(); ?> الإجتماعية</span>
- <?php } ?>
- <?php } ?>
- <!-- End If Male -->
- <?php } else{ ?>
- <!-- If Female -->
- <?php
- $string= get_the_title();
- if(strlen($string) != mb_strlen($string, 'utf-8'))
- {?>
- <?php $contactstatus = get_post_meta($post->ID, 'ecpt_maritalstatus', true); if ( $contactstatus == 'Married' ) { ?>
- <!-- If Arabic -->
- <?php if( get_post_meta($post->ID, 'ecpt_partnertitle', true) ) { ?><?php echo get_post_meta($post->ID, 'ecpt_partnertitle', true); ?> <?php } else { ?> <span style="color: red;font-weight: bold;">يرجى تزويدنا باسم الزوج</span> <?php } ?>
- <?php echo get_post_meta($post->ID, 'ecpt_alternativename', true); ?> وعقيلته
- <?php $modifiedtitle = get_post_meta($post->ID, 'ecpt_contacttitle', true);
- echo str_replace("حضرة","","$modifiedtitle"); ?> <?php the_title(); ?> المحترمين<!-- End If Arabic -->
- <?php } else { ?>
- <span style="color: red;font-weight: bold;">يرجى التأكد من حالة <?php the_title(); ?> الإجتماعية</span>
- <?php } ?>
- <?php } else { ?>
- <?php $contactstatus = get_post_meta($post->ID, 'ecpt_maritalstatus', true); if ( $contactstatus == 'Married' ) { ?>
- <!-- If English -->TO ASK <?php echo get_post_meta($post->ID, 'ecpt_contacttitle', true); ?> & Ms. <?php the_title(); ?><!--End If English -->
- <?php } else { ?>
- <span style="color: red;font-weight: bold;">يرجى التأكد من حالة <?php the_title(); ?> الإجتماعية</span>
- <?php } ?>
- <?php } ?>
- <!-- End If Female -->
- <?php } ?>
- <!--if Couple Invitation End -->
- <?php } else{ ?>
- <!--if Single Invitation Start -->
- <!-- If Male -->
- <?php $your_custom_field = get_post_meta($post->ID, 'ecpt_gender', true); if ( $your_custom_field == 'Male' ) { ?>
- <?php
- $string= get_the_title();
- if(strlen($string) != mb_strlen($string, 'utf-8'))
- {?>
- <!-- If Arabic --><?php echo get_post_meta($post->ID, 'ecpt_contacttitle', true); ?> <?php the_title(); ?> المحترم<!-- End If Arabic -->
- <?php } else { ?>
- <!-- If English --><?php echo get_post_meta($post->ID, 'ecpt_contacttitle', true); ?> <?php the_title(); ?><!--End If English -->
- <?php } ?>
- <!-- End If Male -->
- <?php } else{ ?>
- <!-- If Female -->
- <?php
- $string= get_the_title();
- if(strlen($string) != mb_strlen($string, 'utf-8'))
- {?>
- <!-- If Arabic --><?php echo get_post_meta($post->ID, 'ecpt_contacttitle', true); ?> <?php the_title(); ?> المحترمة<!-- End If Arabic -->
- <?php } else { ?>
- <!-- If English --><?php echo get_post_meta($post->ID, 'ecpt_contacttitle', true); ?> <?php the_title(); ?><!--End If English -->
- <?php } ?>
- <!-- End If Female -->
- <?php } ?>
- <!--if Single Invitation End -->
- <?php } ?>
- </a>
- </h5></td>
- <td id="position"><h5><?php echo get_post_meta($post->ID, 'ecpt_position', true); ?></h5></td>
- <td id="address"><h5><?php echo get_post_meta($post->ID, 'ecpt_address', true); ?></h5></td>
- <td id="phone"><h5><?php echo get_post_meta($post->ID, 'ecpt_phone', true); ?></h5></td>
- <td id="mobile"><h5><?php echo get_post_meta($post->ID, 'ecpt_mobile', true); ?></h5></td>
- <td id="email"><h5><?php echo get_post_meta($post->ID, 'ecpt_email', true); ?></h5></td>
- <td id="invitations"><h5></h5></td>
- <td id="invities"><h5></h5></td>
- </tr>
- <?php $counter++; ?>
- <?php
- endwhile;
- $total_invitees+=$cat_invitees;
- $total_invitations+=$cat_invitations;
- } ?>
- <tr id="categoryname" style="background-color:#46a5e5;">
- <td style="color:#FFFFFF"></td>
- <td style="color:#FFFFFF"></td>
- <td style="color:#FFFFFF"></td>
- <td style="color:#FFFFFF"></td>
- <td style="color:#FFFFFF"></td>
- <td style="color:#FFFFFF"></td>
- <td style="color:#FFFFFF;text-align:center;font-weight: bold;padding: 0px;"><?php echo $cat_invitations ;?></td>
- <td style="color:#FFFFFF;text-align:center;font-weight: bold;padding: 0px;"><?php echo $cat_invitees ;?></td>
- </tr>
- <?php
- }
- }
- } wp_reset_query(); // Restore global post data stomped by the_post(). ?>
- <tr id="categoryname">
- <td style=" background-color: #17376e;color:#FFFFFF"></td>
- <td style=" background-color: #17376e;color:#FFFFFF"></td>
- <td style=" background-color: #17376e;color:#FFFFFF"></td>
- <td style=" background-color: #17376e;color:#FFFFFF"></td>
- <td style=" background-color: #17376e;color:#FFFFFF"></td>
- <td style=" background-color: #17376e;color:#FFFFFF"></td>
- <td style=" background-color: #17376e;color:#FFFFFF">
- إجمالي عدد الدعوات </br>
- <?php echo $total_invitations; ?> </td>
- <td style=" background-color: #17376e;color:#FFFFFF">
- إجمالي عدد المدعويين<?php echo $total_invitees; ?></td>
- </tr>
- </tbody>
- </table>
- <?php } ?> <!--end--show-table-->
- <?php } else { ?>
- <style>
- label {
- min-width: 120px;
- }
- </style>
- عذراً، ليس لديكم صلاحية إضافة أو تعديل مناسبة، يرجى تسجيل الدخول
- <?php $args = array(
- 'echo' => true,
- 'redirect' => ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'],
- 'form_id' => 'loginform',
- 'label_username' => __( 'إسم المستعار' ),
- 'label_password' => __( 'كلمة السر' ),
- 'label_remember' => __( 'تذكرني' ),
- 'label_log_in' => __( 'تسجيل الدخول' ),
- 'id_username' => 'user_login',
- 'id_password' => 'user_pass',
- 'id_remember' => 'rememberme',
- 'id_submit' => 'wp-submit',
- 'remember' => true,
- 'value_username' => '',
- 'value_remember' => false
- ); ?>
- <?php wp_login_form( $args ); ?>
- <?php }; ?>
- </article>
- <?php if(ot_get_option('enable_author')!='off'){ ?>
- <div class="about-author">
- <div class="author-avatar">
- <?php
- if(isset($_is_retina_)&&$_is_retina_){
- echo get_avatar( get_the_author_meta('email'), 100, get_template_directory_uri() . '/images/avatar-2x-retina.jpg' );
- }else{
- echo get_avatar( get_the_author_meta('email'), 100, get_template_directory_uri() . '/images/avatar-2x.jpg' );
- }?>
- </div>
- <div class="author-info">
- <h4><?php the_author_posts_link(); ?></h4>
- <?php the_author_meta('description'); ?>
- </div>
- <div class="clearfix"></div>
- </div><!--/about-author-->
- <?php }?>
- <?php if(ot_get_option('single_navi')!='off'){ ?>
- <div class="simple-navigation">
- <div class="row">
- <?php
- $p = get_adjacent_post(true, '', true);
- $n = get_adjacent_post(true, '', false);
- ?>
- <div class="simple-navigation-item col-md-6 col-sm-6 col-xs-6 main-color-1-bg-hover <?php echo empty($n)?'no-border':'' ?>">
- <?php
- if(!empty($p)){ echo '<a href="' . get_permalink($p->ID) . '" title="' . esc_attr($p->post_title) . '" class="maincolor2hover">
- <i class="fa fa-angle-left pull-left"></i>
- <div class="simple-navigation-item-content">
- <span>'.__('Previous','cactusthemes').'</span>
- <h4>' . $p->post_title . '</h4>
- </div>
- </a>';}
- ?>
- </div>
- <div class="simple-navigation-item col-md-6 col-sm-6 col-xs-6 main-color-1-bg-hover <?php echo empty($n)?'hidden':'' ?>">
- <?php
- if(!empty($n)) echo '<a href="' . get_permalink($n->ID) . '" title="' . esc_attr($n->post_title) . '" class="maincolor2hover pull-right">
- <i class="fa fa-angle-right pull-right"></i>
- <div class="simple-navigation-item-content">
- <span>'.__('Next','cactusthemes').'</span>
- <h4>' . $n->post_title . '</h4>
- </div>
- </a>';
- ?>
- </div>
- </div>
- </div><!--/simple-nav-->
- <?php }?>
- </div><!--/content-->
- <?php if($layout != 'full'){get_sidebar();} ?>
- </div><!--/row-->
- <?php if($content_padding!='off'){ ?>
- </div><!--/content-pad-3x-->
- <?php }?>
- </div><!--/container-->
- </div><!--/body-->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement